Details
-
Bug
-
Resolution: Fixed
-
High
-
5.4.4
-
PHP 5.6.6
libxml(libxml2) version 2.7.6
CentOs & RHEL
Description
Ampersand characters (&) in the XML Text block are turned into & incorrectly on content publish.
The issue seems to be with structHandler for element #text in the ezxmlinputhandler in eZ Publish Legacy.
Before it is called the ampersands are correct.
XML before callOutputHandler structHandler for element #text <kernel-datatype-ezxmltext>: <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph>&<></paragraph> <paragraph/></section>
But after it the ampresands get turned into html entities again breaking content.
XML after callOutputHandler structHandler for element #text <kernel-datatype-ezxmltext>: <?xml version="1.0" encoding="utf-8"?> <section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/" xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/"> <paragraph> <line xmlns:tmp="http://ez.no/namespaces/ezpublish3/temporary/" tmp:new-element="true"> &amp;&lt;&gt; </line> </paragraph> <paragraph/></section>
Steps to reproduce
- Log on to admin
- Create a new object from a class that has an XML Text block attribute
- In the Rich editor type in &<>
- Send to publish
- View the newly created object and check the XML Text attribue
- You will see
&<>
instead of &<>
- You will see