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

Content inserted under the BODY element is sometimes ignored

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.6
    • Fix Version/s: 11.10
    • Component/s: Diff
    • Labels:
      None
    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Medium
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: