Project

General

Profile

Actions

Defect #7781

closed

TOC links do not work in Chrome

Defect #7781: TOC links do not work in Chrome

Added by Sam Nguyen over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Resolution:
Invalid
Affected version:

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\">&para;</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">&para;</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 15 years ago Actions #1

  • Target version set to Candidate for next minor release

Updated by Felix Schäfer over 15 years ago Actions #2

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 15 years ago Actions #3

  • Target version deleted (Candidate for next minor release)

Updated by Sam Nguyen over 15 years ago Actions #4

  • 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 15 years ago Actions #5

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Thanks.

Actions

Also available in: PDF Atom