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

Incorrect getText() after parsing the DOCDECL section #194

Closed
belingueres opened this issue Apr 5, 2022 · 1 comment
Closed

Incorrect getText() after parsing the DOCDECL section #194

belingueres opened this issue Apr 5, 2022 · 1 comment

Comments

@belingueres
Copy link
Contributor

In plexus-utils 3.4.1 and 3.4.0, the text inside the DOCDECL section is incorrectly parsed:
In this XML file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document [
<!ENTITY flo "&#x159;">
<!ENTITY myCustomEntity "&flo;">
]>
<document>&myCustomEntity;</document>

the getText() call after parsing the DOCDECL token should be:

 document [
<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space, U+00A0 ISOnum -->
<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
<!ENTITY tritPos  "&#x1d7ed;"> <!-- MATHEMATICAL SANS-SERIF BOLD DIGIT ONE -->
<!ENTITY flo "&#x159;">
<!ENTITY myCustomEntity "&flo;">
]

but was: &#x159;

belingueres added a commit to belingueres/plexus-utils that referenced this issue Apr 5, 2022
* codehaus-plexus#163 - new case:  Don't assume UTF8 as default, to allow parsing from String.
* codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
belingueres added a commit to belingueres/plexus-utils that referenced this issue Apr 6, 2022
* codehaus-plexus#163 - new case:  Don't assume UTF8 as default, to allow parsing from String.
* codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
belingueres added a commit to belingueres/plexus-utils that referenced this issue Apr 14, 2022
* codehaus-plexus#163 - new case:  Don't assume UTF8 as default, to allow parsing from String.
* codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
* Added tests exercising other regressions exposed while fixing this issues.
belingueres added a commit to belingueres/plexus-utils that referenced this issue Apr 15, 2022
* codehaus-plexus#163 - new case:  Don't assume UTF8 as default, to allow parsing from String.
* codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
* Added tests exercising other regressions exposed while fixing this issues.
michael-o pushed a commit that referenced this issue Apr 16, 2022
* #163 - new case:  Don't assume UTF8 as default, to allow parsing from String.
* #194 - Incorrect getText() after parsing the DOCDECL section.
* Added tests exercising other regressions exposed while fixing this issues.
@michael-o
Copy link
Member

Fixed with #195.

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