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

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.0.0, 16.10.7
    • Syntax - xwiki/2.1
    • None
    • Unknown

    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

        Activity

          People

            Unassigned Unassigned
            rjakse Raphaƫl Jakse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: