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

Allow anchors in Links to Attachments

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.6.1
    • Fix Version/s: None
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      Currently if trying to set an anchor in a link to an attachment, like:

      [[PDF (page 2)>>attach:some_pdf.pdf||anchor="page2"]]
      

      this renders as

      <a anchor="page2" href="/xwiki/bin/download/path/to/page/some_pdf.pdf">PDF (page 2)</a>
      

      Aside of the fact that an "anchor" attribute does not exist in HTML (as far as I know) it might be nicer to render this as href="/xwiki/bin/download/path/to/page/some_pdf.pdf#page2" because at least some browsers understand the #pageX to open the PDF attachment on page X.

      Admittedly browser support is spotty as this is no W3C standard, and for other types of attachments it is useless, but in the current implementation it is useless completely instead of only 95% of the time.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              camil7 Clemens Robbenhaar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: