Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#51 closed defect (duplicate)

anchor links broken in trunk.

Reported by: halkeye@… Owned by: athomas
Priority: normal Component: TocMacro
Severity: major Keywords:
Cc: Trac Release:


In the lastest svn (as of mid day yesterday) trunk of trac, anchor links in TocMacro are broken.

I fixed them by doing:

---      (revision 110)
+++      (working copy)
@@ -63,9 +63,9 @@
                     anchor = default_anchor + str(anchor_n)
                     anchor_n += 1
-                link = page + "#" + anchor
+                link = page
                 if current_depth <= max_depth:
-                    out.write('<a href="%s">%s</a></li>\n' % (, header))
+                    out.write('<a href="%s#%s">%s</a></li>\n' % (, anchor, header))
     while current_depth > min_depth:
         if current_depth <= max_depth:

Not sure if that'd break any security or whatever, but yea, otherwise thigns are url encoded and thus no longer anchors (or maybe just in firefox)

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by athomas

  • Resolution set to duplicate
  • Status changed from new to closed
  • version changed from stable to trunk

Duplicate of #23

comment:2 Changed 11 years ago by athomas

  • milestone 0.9 deleted

Milestone 0.9 deleted

Add Comment

Modify Ticket

as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.