How best do I sanitize text like
abc' a>b<c & a<b>c
converting/displaying
abc' a>b≤c & a≤b>c
or in clear text
abc' a>b<c & a<b>c
so that I can use it via
myDiv.innerHtml=... or
myDiv.setInnerHtml(..., myValidator, mySantitizer);
A text assignment myDiv.text=...
converts all & and <> eliminating the valid apostrophe '
- the HtmlEscape.convert(..) class/method also converts all & in all HtmlEscapeMode's.
Could write my own Sanitizer, but hope that I overlooked some standard library/call.
DartPad Link
RexExp for HTML Entity