wiris / html-integrations

The official JavaScript library for MathType, the leading formula editor and equation writer for the web by Wiris
https://wiris.com/solutions/integrations/html-editors/
MIT License
76 stars 53 forks source link

Fix viewer utils in order to send only valid XML to the server #963

Closed psala-at-wiris closed 5 months ago

psala-at-wiris commented 5 months ago

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

#taskid 45734

Changes.md

fix: change htmlEntitiesToXmlEntities' implementation in order to assure only valid XML

usantos-at-wiris commented 5 months ago

Great way to solve it! Good job!