xmlunidefuse
Encode the predefined XML entities (amp, lt, gt, apos, quot) and some additional, easily overlooked Unicode characters. Opt-out CharRef 39 for HTML (Why?).
Usage
From test.js:
var xud = eq = strictEqual raw = "<!-- <u snow=\"man'>☃</u -->"; ; ; // CDATA mode is implemented but not recommended,// because it makes the sneaky chars VERY visible.;
Related
- univeil: Unveil sneaky Unicode characters.
- xmldefuse: Encode only the predefined XML entities.
- xmldecode: Decode the predefined XML entities, CharRefs and CDATA sections.
License
ISC