Parsing URL as markup
-
Continuing the discussion from Status: I'm Doing Science and I'm still alive.:
Post contained the following link in raw:
<a target="_blank" href="https://en.m.wikipedia.org/wiki/Pao_v._Kleiner_Perkins">FTFY.</a>
In the baked version, the link URL is transformed to this:
https://en.m.wikipedia.org/wiki/Pao%3C/em%3Ev.%3Cem%3EKleiner%3C/em%3EPerkins
Discourse parsed the
_
characters in the URL as markup, transformed them to (mismatched)<em>
and</em>
tags, and totally Belgiumed-up the link. (I'm not sure whether Discourse URL-encoded the<
and>
characters, or the browser did. In either case, it's a secondary effect; it wouldn't have happened if Discourse hadn't already buggered the URL.)
-
Could you even make a parser this dysfunctional on purpose?
-
That's the next OMGWTF contest.
-
-
Ah yes, but it doesn't allow me to set a
target
.
-
Does Discourse allow that? I know it didn't allow rel="nofollow" last time I tried it.
-
That's been added to the whitelist, but I don't think I have the stomach to figure out this parser bug... just use your "open external links in new tab" setting.
-