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

Leading non-breakable space before a formatting element in a block element is transformed in a regular whitespace

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      This usecase is a particular case of XRENDERING-491, but probably related to a whole different piece of code.

      The following XHTML

      <table><tr><td>&nbsp;<i>Before i</i></td></tr></table>
      <p>&nbsp;<i>Before i</i></p>
      

      parsed in XDOM and then re-rendered in XHTML gives:

      <table><tr><td> <em>Before i</em></td></tr></table><p> <em>Before i</em></p>
      

      Notice how the nbsps have become regular spaces.
      I would expect instead:

      <table><tr><td>&nbsp;<i>Before i</i></td></tr></table><p>&nbsp;<i>Before i</i></p>
      

      See the attached test I wrote, currently failing on a branch with XRENDERING-491 fixed.

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: