node-xml icon indicating copy to clipboard operation
node-xml copied to clipboard

Handling of &#...; entities

Open atomictag opened this issue 14 years ago • 0 comments

It looks that the parser does not correctly handle entities in the form &#...; (e.g. Zürich -> Zürich). They get translated into empty strings because _replaceEntity calls the following (line 687): strEnt = String.fromCharCode(parseInt(strD.substring(iB + 1, iE))); but it should really be: strEnt = String.fromCharCode(parseInt('0x' + strD.substring(iB + 2, iE))); (at least, this is working for me with German-language entitities like ü. ö etc.

atomictag avatar Jun 21 '11 14:06 atomictag