-
Notifications
You must be signed in to change notification settings - Fork 49
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
Fix viewer utils in order to send only valid XML to the server #963
Conversation
Great way to solve it! Good job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some MathML had corrupted character that needed to be changed, even though the test did not raise errors when transforming the MathML to XML.
Information taken from:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buen trabajo!
taskid #45734
Description
Some user inputs were causing the server to fail due to malformed XML. When retrieving MathML, the generated text is transformed into HTML, which is not 100% compatible with XML. The current solution uses the browser's native XMLParser to transform HTML into XML and ensures that only valid XML is sent to the server.
Steps to reproduce
Unit tests
Ui
<math xmlns="http://www.w3.org/1998/Math/MathML"><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">«</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px"><</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">»</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">></mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">§</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">&</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">¨</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">"</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">'</mo><mo mathvariant="bold" mathcolor="#7F0000" mathsize="48px">'</mo></math>
<math><mn mathcolor="red">"4</mn><mo>×</mo><mi>x</mi></math>
#taskid 45734
Changes.md
fix: change htmlEntitiesToXmlEntities' implementation in order to assure only valid XML