You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
the thing is , new <a> element's attribute is surrounded by double quote ", and if the url detected from regexp also has double quote, problems occur. The html generated before sanitizing is
<ahref="http://www.google.co.jp/search/?q="ddddd>test">http://www.google.co.jp/search/?q="ddddd>test</a> so
after sanitizing, it becomes
<ahref="http://www.google.co.jp/search/?q=">test">http://www.google.co.jp/search/?q="ddddd>test</a> so
as you can see, extra "test" comes and the link url is sliced.
if there is only double quote " and no >, the link text is ok but url is still not full.
Suggestion
Although it is not often to have " or > to be seen in a url , but since the Regexp used to detect link allows both of them, so I think maybe it's best to make look good.
maybe one way is to change " to ",
html.push(url.replace(/"/g,'"');
The text was updated successfully, but these errors were encountered:
Email addresses can (under certain restrictions) include double quote
characters. See http://tools.ietf.org/html/rfc3696#section-3.
For example, `"Jo Bloggs"@abc.com` is a valid email address.
When serializing emails to the `href` attribute of an anchor element,
we must HTML encode these double quote characters. See
http://www.w3.org/TR/html-markup/syntax.html#syntax-attr-double-quoted
This commit does not attempt to improve the functionality (i.e. regex)
that attempts to identify email addresses in a general string.
Closes#8945Closes#8964Closes#5946Closes#10090Closes#9256
Email addresses can (under certain restrictions) include double quote
characters. See http://tools.ietf.org/html/rfc3696#section-3.
For example, `"Jo Bloggs"@abc.com` is a valid email address.
When serializing emails to the `href` attribute of an anchor element,
we must HTML encode these double quote characters. See
http://www.w3.org/TR/html-markup/syntax.html#syntax-attr-double-quoted
This commit does not attempt to improve the functionality (i.e. regex)
that attempts to identify email addresses in a general string.
Closes#8945Closes#8964Closes#5946Closes#10090Closes#9256
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hei, guys,
we are building a project using Angular, but found that filter
linky
have bizzare behavior when the url has double quotes and>
steps to reproduce
for this piece of raw text
"linky" will generate something like this
looking at source code
the linky.js use this function to generate
<a>
element,the thing is , new
<a>
element's attribute is surrounded by double quote"
, and if theurl
detected from regexp also has double quote, problems occur. The html generated before sanitizing isafter sanitizing, it becomes
as you can see, extra "test" comes and the link url is sliced.
if there is only double quote
"
and no>
, the link text is ok but url is still not full.Suggestion
Although it is not often to have
"
or>
to be seen in a url , but since the Regexp used to detect link allows both of them, so I think maybe it's best to make look good.maybe one way is to change
"
to"
,The text was updated successfully, but these errors were encountered: