Project

General

Profile

Actions

Defect #7781

closed

TOC links do not work in Chrome

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wiki
Target version:
-
Start date:
2011-03-04
Due date:
% Done:

0%

Estimated time:
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)

Actions #1

Updated by Etienne Massip over 13 years ago

  • Target version set to Candidate for next minor release
Actions #2

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.

Actions #3

Updated by Etienne Massip over 13 years ago

  • Target version deleted (Candidate for next minor release)
Actions #4

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

Actions #5

Updated by Etienne Massip over 13 years ago

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

Thanks.

Actions

Also available in: Atom PDF