Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-24703

HTML Export - Anchor linking to anchors within same page broken

    XMLWordPrintable

    Details

    • Testing Notes:
      Hide
      • Export page contains external links, internal links, anchor links then open archive file and view source the link to anchor it must be contains #anchor and click on the link it will be scroll to the anchor.
      • Export the page a normal page does not contains any anchor and link to anchor.
      Show
      Export page contains external links, internal links, anchor links then open archive file and view source the link to anchor it must be contains #anchor and click on the link it will be scroll to the anchor. Export the page a normal page does not contains any anchor and link to anchor.

      Description

      We are experiencing when doing the following:

      1. Insert -> Other Macros -> Anchor -> Enter "exampleAnchor"
      (For testing purposes place further down page after what is visible on 1 page)
      2. Link -> "#exampleAnchor"

      Once saved if you inspect the link on the confluence page it is correct in being:
      href="#exampleAnchor
      And clicking on the link will jump to the anchor

      The following is where we see the issue
      1. Browse -> Advanced -> HTML Export
      2. Download and Explode the zip
      3. Go to the example page above
      4. href is incorrect, will be something like:
      href="page.html#"
      5. Click on the link will not jump to the anchor as expected as it is missing the anchor ref name.

      Here is an example I've created in the confluence sandbox:
      http://sandbox.onconfluence.com/display/MAR/Test
      I'm observed the same issue above when doing a HTML Export via Browse -> Advanced -> HTML Export.

      ----------------------------------

      Before upgrading to Confluence 4 this functionality previously worked in Confluence 3.5

      We have inpected the resulting HTML and it looks like the href attribute of the anchors do not have the anchor name appended after the # character

      <a href="page.html#">Link To Section One</a>
      ...
      ...
      ...
      <a name="sectionOne">Section One</a>

      The href value should be "page.html#sectionOne"

      Please advise if more detail is required

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                23 Vote for this issue
                Watchers:
                24 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  2 years, 49 weeks, 5 days ago