Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31272

Anchors having name attribute break RTE validation after copying from external sources

    XMLWordPrintable

    Details

      Description

      Content copied from external tools or editors (e.g. Word) and having anchors formatted like this <a name="some_link"> breaks validation in RichText.

      Steps to reproduce:
      1. Create a new article.
      2. Open Word editor and type some text.
      3. Add an anchor to this text (e.g. using hypertext context menu and by referring to the top of the page).
      4. Copy this text.
      5. Paste it to the RTE and hit Save/Publish.

      Result:
      You will be presented with an error:

      Argument '$xmlDoc' is invalid: Transformation of XML content failed: Error in 0:0: Unhandled link type

      Expected result:
      Validation should not be crashed and content should be published.

      Note:
      This error comes from the fact that name attribute isn't currently supported withing our DocBook schema, ref: https://github.com/ezsystems/ezplatform-richtext/blob/14485d7bdea41e84c0dc477c3332b952da9426bd/src/lib/eZ/RichText/Resources/stylesheets/xhtml5/edit/docbook.xsl#L260.
      Potentially we should map name attribute to id via Xhtml5-Edit to DocBook transformation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              konrad.oboza@ez.no Konrad Oboza
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: