Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-785

Line breaks at the end of block elements should be escaped

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Hi! The following (Confluence) XHTML syntax:

      <h1>Title<br /></h1>
      

      Leads to the following XWiki syntax:

      = {{id name="MySpaceHome-Title"/}}Title
       =
      

      Which produces two titles (the second one is empty). These events are generated:

      beginHeader [1, HTitle]
      onWord [Title]
      onNewLine
      endHeader [1, HTitle]
      

      Which seems correct. It looks like the line break inside the heading should be escaped.

      See also a likely related issue reported at https://forum.xwiki.org/t/table-breaks-when-converting-from-html/16859/2 where, with the HTML syntax, if a line break is at the end of a table cell, the rendering of the table breaks in a similar way.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              rjakse Raphaƫl Jakse
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: