CharacterEscapeConverter - generalize HtmlEscape - dart:convert #13102
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
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: