Skip to content

Conversation

@Holzhaus
Copy link

This fixes Processing Instruction parsing (except for the XML declaration problem, which is fixed by #209), so that whitespace won't be stripped.

Details: https://www.w3.org/TR/2008/REC-xml-20081126/#sec-pi

Holzhaus added 6 commits June 12, 2017 00:01
If you have a look at the actual definition of a Processing instruction
in the XML spec, you'll see that there's no asterisk after the
Whitespace ("S") in the production rule.

[16] PI := '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
According to the XML 1.0 spec, Prod. rule [3], whitespace (S) can also
consist of multiple characters.

I verified this in Firefox and Chromium -- both trim leading whitespace
of the PIData section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant