Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1793

Content inserted under the BODY element is sometimes ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 11.10
    • 11.6
    • Diff
    • None
    • Unit
    • High
    • Medium
    • N/A
    • N/A

    Description

      You can reproduce with this:

      {{velocity}}
      {{html clean="false"}}
      #set ($discard = $xwiki.ssfx.use('uicomponents/viewers/diff.css', true))
      #set ($discard = $xwiki.jsfx.use('uicomponents/viewers/diff.js'))
      #set ($old = '<div>one</div>')
      #set ($new = '<div>one</div>
        <div>two</div>')
      #set ($htmlDiff = $services.diff.html.unified($old, $new))
      <div class="html-diff">
        #if ($htmlDiff == '')
          No changes.
        #elseif ("$!htmlDiff" == '')
          Failed to compute the changes.
        #else
          $htmlDiff
        #end
      </div>
      {{/html}}
      {{/velocity}}
      

      Expected output: "two" is marked as added.
      Actual output: No changes.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: