Details
-
Bug
-
Resolution: Done
-
Medium
-
4.6.4
-
Yes
Description
Html5Input converter doesn't wash input for duplicate IDs.
This may happend when html is cut&pasted into editor:
- Use Ibexa Experience 4.6.3.
- Create a new article.
- Go to https://www.lipsum.com/feed/html # and mark and copy the paragraphs, see screenshot.
- Insert them into the intro field.
- Press submit.
Result :
You get exception : "Warning: DOMDocument::loadXML(): ID lipsum already defined in Entity, line: 2"
The editor will send the following to back-end:
<?xml version="1.0" encoding="UTF-8"?> <section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"> <p id="lipsum">Lorem ipsum(...)</p> <p id="lipsum">Nunc in dignissim ex(...)</p> </section>
Notice the duplicate id lipsum
This get converted into
<?xml version="1.0" encoding="UTF-8"?> <section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml" xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom" version="5.0-variant ezpublish-1.0"> <para xml:id="lipsum">Lorem ipsum(...)</para> <para xml:id="lipsum">Nunc in dignissim ex(...)</para> </section>