Defect #7781
closedTOC links do not work in Chrome
0%
Description
This line generates the Wiki headers in helpers/application_helper.rb:698 (v1.1.1, upgraded from a 1.0.4 installation)
"<h#{level} #{attrs} id=\"#{anchor}\" >#{content}<a href=\"##{anchor}\" class=\"wiki-anchor\">¶</a></h#{level}>"
The problem is that the attrs
variable has an id attribute, so the element has 2 id attributes. In Chrome, the 2nd id is discarded which makes the TOC links unusable.
<h1 id="bfheader-e3fffad18eade3d08eeb5405c650e5b0" id="Web-Backend-API">Web Backend API <a href="#Web-Backend-API" class="wiki-anchor">¶</a></h1>
You can work around this by either rearranging the order of attrs
and id="anchor" in the <h> tag, or removing the
#{attrs} @ completely.
(BTW I am using the Markdown Extra wiki formatting plugin)
Updated by Etienne Massip over 13 years ago
- Target version set to Candidate for next minor release
Updated by Felix Schäfer over 13 years ago
Sam Nguyen wrote:
(BTW I am using the Markdown Extra wiki formatting plugin)
Could you try it with the native textile formatter? The demo site should be sufficient for that. If you can't reproduce it there, it's rather a problem of the markdown plugin.
Updated by Etienne Massip over 13 years ago
- Target version deleted (
Candidate for next minor release)
Updated by Sam Nguyen over 13 years ago
- Status changed from New to Resolved
Indeed, this appears to be a problem with the native wiki formatter. I had no issue on the demo site.
http://demo.redmine.org/projects/wiki-toc-test/wiki/Wiki#Wiki
Updated by Etienne Massip over 13 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid
Thanks.