Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-8258

richtext: Html5Input is not washed for duplicate IDs

    XMLWordPrintable

Details

    • Yes

    Description

      Html5Input converter doesn't wash input for duplicate IDs.

      This may happend when html is cut&pasted into editor:

      1. Use Ibexa Experience 4.6.3.
      2. Create a new article.
      3. Go to https://www.lipsum.com/feed/html # and mark and copy the paragraphs, see screenshot.
      4. Insert them into the intro field.
      5. 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>
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              vidar.langseid@ibexa.co Vidar Langseid
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: