Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error on hexadecimal character reference in attribute value #40

Closed
bfreuden opened this issue Aug 24, 2016 · 0 comments
Closed
Milestone

Comments

@bfreuden
Copy link

When parsing the following xml:
<root att="&#xA;"></root>

The parser fails with the following error:

com.fasterxml.aalto.WFCException: Unexpected character 'A' (code 65) expected a hex digit (0-9a-fA-F) for character entity
at [row,col {unknown-source}]: [1,16]
at com.fasterxml.aalto.in.XmlScanner.reportInputProblem(XmlScanner.java:1333)
at com.fasterxml.aalto.in.XmlScanner.throwUnexpectedChar(XmlScanner.java:1498)
at com.fasterxml.aalto.async.AsyncByteArrayScanner.handleHexEntityInAttribute(AsyncByteArrayScanner.java:4198)

The parser does not seem to support hexadecimal character references not starting with [0-9] although it is allowed by the XML specification.

I will issue a pull request shortly containing a fix proposal with a JUnit test case.

PS: as it is my first comment here, thanks a lot for this great library!

bfreuden pushed a commit to bfreuden/aalto-xml that referenced this issue Aug 24, 2016
bfreuden pushed a commit to bfreuden/aalto-xml that referenced this issue Aug 24, 2016
cowtowncoder added a commit that referenced this issue Mar 28, 2018
@cowtowncoder cowtowncoder added this to the 1.1.0 milestone Mar 28, 2018
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

No branches or pull requests

2 participants