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

Richtext: Possible to create achors with invalid characters

    XMLWordPrintable

Details

    • Yes

    Description

      It is possible to create achors with invalid characters

       
      Steps to reproduce:

      1. create an article
      2. In an richtest field add some random text
      3. select the text and click anchor icon
      4. enter the anchor name some space
      5. Click Publish

      Expected behavior : The article is published:

      Actual behavior : You'll get invalidation error : Validation of XML content failed: Error in 0:0: Element section has extra content: ezembed

      Spaces are not allowed in id's, so the editor should not accept them. The editor in Ibexa DXP 3.3 had validation of this, see screenshot

       

      Also, if you click "Save" button instead of "Publish", Ibexa DXP will store the content in the database without validation, but will not be able to reload it again (due to the validation errors ) and the content will end up in status limbo

       

      Example of the xhtml which editor sends Ibexa DXP :

      <section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"><p id="some space">some text here with anchor</p></section> 

      Which gets converted to docbook like this:

      <?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="some space">some text here with anchor</para></section> 

      Designs

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: