Skip to content
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

Open
kevmoo opened this issue Sep 5, 2013 · 7 comments
Open

CharacterEscapeConverter - generalize HtmlEscape - dart:convert #13102

kevmoo opened this issue Sep 5, 2013 · 7 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-n library-convert type-enhancement A request for a change that isn't a bug

Comments

@kevmoo
Copy link
Member

kevmoo commented Sep 5, 2013

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.

@madsager
Copy link
Contributor

madsager commented Sep 6, 2013

Added Triaged label.

@floitschG
Copy link
Contributor

If there is only one method then a closure would be enough.

@kevmoo
Copy link
Member Author

kevmoo commented Jan 16, 2014

Removed Area-Library label.
Added Library-Convert label.

@kevmoo
Copy link
Member Author

kevmoo commented Jan 16, 2014

Added Area-Library label.

@lrhn
Copy link
Member

lrhn commented Mar 19, 2015

Looking at the code, I get the same idea.

@DartBot
Copy link

DartBot commented May 5, 2015

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

@kevmoo
Copy link
Member Author

kevmoo commented May 5, 2015

Dave: we'd happily take a patch. :-)


Added Community-StarterBug label.

@kevmoo kevmoo added Type-Enhancement library-convert area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels May 5, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@lrhn lrhn added the core-m label Aug 11, 2017
@floitschG floitschG added core-n and removed core-m labels Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. core-n library-convert type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants