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
If I read the XML spec correctly regarding attribute value normalization (https://www.w3.org/TR/xml/#AVNormalize), I think these should be normalized to a single space character. However, the following test case shows that this does not currently happen:
const p = new saxes.SaxesParser();
p.onopentag = n => console.log(JSON.stringify(n.attributes['att']));
p.write('<doc att="a\rb"/>').close();
// logs "a\rb"
The text was updated successfully, but these errors were encountered:
That's a bug. Thank you for the informative report. I've been working on 4.0.0 these days (rc2 is out for trial, rc3 is being worked on), which fixes a slew of problems with EOL handling. I'm going to squeeze this in (probably in rc3). This issue was in sax, and I did not detect the issue when I forked saxes from sax.
I recall looking at that section of the spec before, but I believe that was when I was working on salve as a consumer of parsing output rather than a producer of that output.
That was fast! I can confirm that each \r has now been turned into a space. The XML file linked in the original issue does not contain a doctype, which is probably why these three spaces are not further combined into one, so this seems to be working as expected. Thanks!
I have an XML document containing an attribute with carriage return characters: (https://github.com/w3c/xsdtests/blob/master/msData/regex/RegexTest_63.xml)
If I read the XML spec correctly regarding attribute value normalization (https://www.w3.org/TR/xml/#AVNormalize), I think these should be normalized to a single space character. However, the following test case shows that this does not currently happen:
The text was updated successfully, but these errors were encountered: