Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.87k stars 601 forks source link

Zero width character causes a problem #591

Open Christilut opened 3 years ago

Christilut commented 3 years ago

I just encountered an XML that had a zero width space at index 0 of the file. This caused the __end_position to be off by 1 throughout the entire file.

My fix was simple: just .trim() the string before using it. But maybe this character needs to be ignored/removed?