npm.io
0.1.1 • Published 6 years ago

xmldecode

Licence
ISC
Version
0.1.1
Deps
0
Size
5 kB
Vulns
0
Weekly
0

xmldecode

Decode the predefined XML entities (amp, lt, gt, apos, quot), CharRefs and CDATA sections.

Definitions: Predefined XML entities, CharRefs

API

This module exports one function:

xmldecode(orig)

Returns a string with the text decoded from string orig.

Usage

see test.js

  • xmldefuse: Encode the predefined XML entities and CharRefs. Opt-out CharRef 39 for HTML. Bonus: Encode CDATA.
  • xmlunidefuse: Convert some additional, easily overlooked Unicode characters to CharRefs.

Known issues

  • Needs more/better tests and docs.

 

License

ISC

Keywords