Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#51 closed defect (duplicate)

anchor links broken in trunk.

Reported by: halkeye@… Owned by: Alec Thomas
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 17 years ago by Alec Thomas

Resolution: duplicate
Status: newclosed
version: stabletrunk

Duplicate of #23

comment:2 Changed 17 years ago by Alec Thomas

milestone: 0.9

Milestone 0.9 deleted

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.