Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

linky email sanitize error #10090

Closed
PRR24 opened this issue Nov 17, 2014 · 5 comments
Closed

linky email sanitize error #10090

PRR24 opened this issue Nov 17, 2014 · 5 comments

Comments

@PRR24
Copy link

PRR24 commented Nov 17, 2014

linky fails on text
"my@email.com","x"
with $sanitize.badparse error
Repros in both 1.2 and 1.3 branches.

@petebacondarwin
Copy link
Contributor

Valid bug - here is a reproduction: http://plnkr.co/edit/h6fOmxJRNxuqFfEeuXY6?p=preview

@pkozlowski-opensource
Copy link
Member

@petebacondarwin I guess you've posted a wrong link since your plunk just shows an error from a parser (and rightly so). The actual reproduce scenario for the linky bug would be: http://plnkr.co/edit/dVoa2HtsPs95hoLmww8U?p=preview

@lgalfaso
Copy link
Contributor

#8964 should fix this (will not make the email regex any better, but at least will not break)

lgalfaso added a commit that referenced this issue Nov 23, 2014
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 #8945
Closes #8964
Closes #5946
Closes #10090
Closes #9256
@PRR24
Copy link
Author

PRR24 commented Nov 26, 2014

Still repro with 1.3.4, please re-open

@lgalfaso lgalfaso reopened this Nov 26, 2014
@lgalfaso
Copy link
Contributor

PRR24 is right, if there are multiple quotes, then only the first will get escaped. Will post a fix in a few

lgalfaso added a commit to lgalfaso/angular.js that referenced this issue Nov 26, 2014
When encoding a URL or an email address, then escape all double quotes

Closes angular#10090
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.