You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the following in a browser: JSON.stringify(new DOMParser().parseFromString('<p>A\r\nB</p>', 'text/xml').documentElement.textContent). It returns the following string: "A\nB"
However, in saxes, I get an ontext event with A\r\nB as the text argument.
The spec states that it is the responsibility of the 'XML processor' to normalize line endings. Since saxes is an XML parser, I'd say that saxes should normalize these line endings.
What's your opinion on this matter?
The text was updated successfully, but these errors were encountered:
I'm thinking you're right again. Thank you for the report! This is going to complicate the parsing logic a bit because saxes allows streaming so it is not possible when encountering \r at the end of a chunk of data to know how it should be handled until the next chunk comes.
When I run the following in a browser:
JSON.stringify(new DOMParser().parseFromString('<p>A\r\nB</p>', 'text/xml').documentElement.textContent)
. It returns the following string:"A\nB"
However, in saxes, I get an ontext event with
A\r\nB
as the text argument.The spec states that it is the responsibility of the 'XML processor' to normalize line endings. Since saxes is an XML parser, I'd say that saxes should normalize these line endings.
What's your opinion on this matter?
The text was updated successfully, but these errors were encountered: