Defect #3673
closedErronous Wikilink/anchor formatting in export as html
0%
Description
I have an 0.8.4 install on passenger.
I'm currently writing an SRS on a wiki page. I have a TOC i wrote myself with:- This is my text [ [#TheAnchorIWanted | This is my text] ]
When displaying the wikipage from within redmine, all is well. The link displays correctly, and works correctly.
However, when exporting the page to html, the href attribute changes from '#TheAnchorIWanted' to '#TheAnchorIWanted.html'. Hence, the anchor is unfunctional.
When exporting multiple pages at once, the href becomes '##TheAnchorIWanted', unfunctional, again.
I would love to be able to send exported wikipages to people without having to edit them before hand. Mainly for archival purposes, or having people validate a document without giving them access to my redmine installation.
Updated by Lawrence Anon almost 16 years ago
On second thought, I don't think i've expressed the problem clearly enough.
Here are my attempts at making same-page anchor links:
"Test Link":#Anchor
This syntax is unrecognized in redmine, however, it works on both the textile site (hobbix) and the ruby implementation of it Redmine uses (redcloth)
Test Link "[ [#Anchor|Test Link] ]"
This syntax works part of the time within the redmine canvas. I haven't been able to pinpoint the conditions for it to work. I believe it has something to do with the formatter escaping the hash (#) symbol into an html entity, which fools the the wiki into creating a page called '%23Anchor'.
The Textile implementation in Redmine is RedCloth, with is a Textile/MarkDown hybrid. The version used in redmine 0.8.4 is 3.4 i believe. The latest version on redcloth.org is 4.2.2. Their latest version renders anchor links correctly. I would much appreciate an update of redcloth in the next release.
Updated by Lawrence Anon almost 16 years ago
The conditions underwhich the WikiLink syntax work is when the Hash is preceeded by the page name. Which breaks the links when the page is exported.
Updated by Daniel Felix over 12 years ago
- Status changed from New to Closed
- Resolution set to Cant reproduce
Well, I tried this with the current trunk and I'm not able to reproduce it anymore. The links seem to be generated correctly.