Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13342

entityReference.js resolver doesn't work correctly when the base reference has multiple spaces

    Details

    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      You can reproduce the issue by executing the following line on the JavaScript console:

      XWiki.Model.resolve('', XWiki.EntityType.DOCUMENT, XWiki.currentDocument.getDocumentReference());
      

      from a nested page with at least two ancestors. The problem is that the resolved reference takes only the last space reference from the base reference. E.g. if the current page is wiki:One.Two.Three, the resolved reference is wiki:Two.Three .

        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: