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
XML attributes escaping seems to be broken #339
Comments
Probably related to #198 |
Thank you for reporting it, but this is a duplicate of #58. There are some issues with your report though:
Just to be extra sure, I also additionally log the value of the attribute after parsing which of course always contains the
Here are those links again: If you know of any other spec that indicates the limitation you are describing, please provide a link to it. |
Thank you for the quick response @karfau What I could read in the specification that you've attached is:
xmllib2 and other serializers are doing that escaping for ">" character (if you know any lib that does not then please let me know). I was just wondering then what is the reason this library should be different from them? |
Here is how I understand the specs, piece by piece:
not a must, but allowed
(empahsis mine) Only when it is part of content and preceded by Why is xmldom not doing it like other libaries? |
Sure, thanks for the detailed explanation. |
It looks like attributes parsing has been broken in some previous xmldom versions. I'm not sure which one, but here are the details:
The expected output here would be
<?xml version="1.0" encoding="UTF-8"?><root><element attribute="<>"&"/></root>
, but the current recent module version (0.7.5
) outputs<?xml version="1.0" encoding="UTF-8"?><root><element attribute="<>"&"/></root>
, e.g.the
>
character does not get escaped properly while it is prohibited to use in attribute values according to the XML spec.The text was updated successfully, but these errors were encountered: