啦沐达
啦沐达
博主的镜像是不是有问题呀……最后两分钟提示校验失败
maybe because m.trust include marilto link like this: abcdefg@abc.com ``` abcdefg@abc.com ```
> Could you share examples of the HTML source that crashes Safari? `m.trust()` uses `innerHTML` under the hood, no high magic... > > Short of leaking memory from JS, a...
> https://www.o-o.space/#!/home/479 ohh,no no 😂 the m.trust only be used to parse markdown-html-code as before mentioned like: ``` abcdefg@abc.com ``` ``` m.trust(marked(/*article-start...*/"[email protected]"/*article-end...*/)) ``` the HTML-page is the content from safari...
> What I'd like to see is the exact input that goes into `m.trust()`. In other words the return value of `marked(/*article-start...*/"[email protected]"/*article-end...*/)` # console.log(node = m.trust(marked(content))) ``` Object attrs: undefined...
I use this as temporary solution: ``` content = content.replace(/([a-zA-Z0-9_]+)@([a-zA-Z0-9_\.]+)\.([a-zA-Z]+)/g,"$1# $2.$3") ```
> Thanks, this looks completely inoccuous... I don't think Mithril or the HTML is at fault here. At least not the bits you shared. It could cause the planets to...
> AFAIK, short of a bug, the only way to crash a browser tab is to exhaust memory. > > I don't think that `m.trust()` can do that. `m.trust()` alone...
> Indeed I had skipped that bit of your post, sorry. > > What if you add a `mailto:` link statically in the HTML source page? What about a `m('a',...
> Indeed I had skipped that bit of your post, sorry. > > What if you add a `mailto:` link statically in the HTML source page? What about a `m('a',...