-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CharacterEscapeConverter - generalize HtmlEscape - dart:convert #13102
Comments
Added Triaged label. |
If there is only one method then a closure would be enough. |
Removed Area-Library label. |
Added Area-Library label. |
Looking at the code, I get the same idea. |
This comment was originally written by daven...@gmail.com Working w/ it today, I think it could definitely use some simplification! http://stackoverflow.com/questions/30061271/sanitize-html-with-htmlescape-only-and |
Dave: we'd happily take a patch. :-) Added Community-StarterBug label. |
After doing the work on HtmlEscape - r27211 - I wondered if it would be valuable to have a general CharacterEscapeConverter
ctor for CharacterEscapeConverter has one argument: CharacterEscape
abstract class CharacterEscape has one method 'escape'
String escape(String input)
or String escape(int codeUnit/rune) -- whichever is most efficient
Then HtmlEscapeMode becomes a subclass of CharacterEscape.
It implements the escape logic.
Others could implement their own HTML escape implementations.
The text was updated successfully, but these errors were encountered: