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.