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

Autolinks have the wrong HREF when the base reference is not the current page

    XMLWordPrintable

Details

    • N/A
    • N/A

    Description

      To reproduce, create a page (e.g. Main.Page1.WebHome):

      {{context document="Main.Page2.WebHome"}}
      [[label1>>]]
      [[label2>>something]]
      {{/context}}
      

      You'll see that the first link points to the current page (incorrect), while the second one points to a children of Main.Page2.WebHome (correct).

      AFAICS this is because in https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/DocumentXHTMLLinkTypeRenderer.java#L143 we always generate an HREF of "#", even if the base reference is different from the current reference.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: