Closed ykawakamy closed 1 year ago
When calling setAttribute, even unchanged attributes are escaped. I would like to keep the original strings when editing the HTML source.
setAttribute
Example:
root = HTMLParser.parse("<div unchanged='[\npreserve newline\n]'></div>"); div = root.firstChild console.log(div.toString()) // output: // <div unchanged='[ // preserve newline // ]'></div> div.setAttribute("append","newAttribute"); console.log(div.toString()) // output: // <div unchanged="[\\npreserve newline\\n]" append="newAttribute"></div>' // expected: // <div unchanged='[ // preserve newline // ]' append="newAttribute"></div>'
Thank you.
When calling
setAttribute
, even unchanged attributes are escaped. I would like to keep the original strings when editing the HTML source.Example: