bwrrp / slimdom.js

Fast, tiny, standards-compliant XML DOM implementation for node and the browser
MIT License
30 stars 8 forks source link

Escape whitespace characters in attribute values #117

Closed bwrrp closed 4 years ago

bwrrp commented 4 years ago

Tabs, carriage returns and line feeds in attribute values currently do not survive a round-trip through serialization (see w3c/DOM-Parsing#59). It looks like Chrome, Firefox and Edge deviate from the spec and do escape these characters such that they can round-trip cleanly. We should probably do the same.