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

Avoid greedy apos entity replacement in attributes #345

Open
gitusa opened this issue Jun 2, 2015 · 0 comments
Open

Avoid greedy apos entity replacement in attributes #345

gitusa opened this issue Jun 2, 2015 · 0 comments

Comments

@gitusa
Copy link

gitusa commented Jun 2, 2015

When using a single quotation mark (') in an attribute value it'll be replaced to "'", e.g. myattribute="attribute's value" will be saved as myattribute="attribute&pos; value".

This replacement isn't necessary here: Microsoft says "In cases where the character might cause the XML parser to misinterpret the document structure, use the entity instead of typing the character" (https://msdn.microsoft.com/en-us/library/ms256190(v=vs.110).aspx)

As every attribute's value is enclosed with double quotation marks (and no single quotation marks are used for enclosing an attribute's value by tinyxml2) there is no concern of misinterpretation and a replacement shouldn't be made in order to keep the original xml source value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants