Project

General

Profile

Actions

Defect #7781

closed

TOC links do not work in Chrome

Added by Sam Nguyen about 13 years ago. Updated about 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

Also available in: Atom PDF