Modify ↓
#51 closed defect (duplicate)
anchor links broken in trunk.
Reported by: | Owned by: | Alec Thomas | |
---|---|---|---|
Priority: | normal | Component: | TocMacro |
Severity: | major | Keywords: | |
Cc: | Trac Release: |
Description
In the lastest svn (as of mid day yesterday) trunk of trac, anchor links in TocMacro are broken.
I fixed them by doing:
Index: TOC.py =================================================================== --- TOC.py (revision 110) +++ TOC.py (working copy) @@ -63,9 +63,9 @@ anchor = default_anchor + str(anchor_n) anchor_n += 1 seen_anchors.append(anchor) - link = page + "#" + anchor + link = page if current_depth <= max_depth: - out.write('<a href="%s">%s</a></li>\n' % (env.href.wiki(link), header)) + out.write('<a href="%s#%s">%s</a></li>\n' % (env.href.wiki(link), anchor, header)) while current_depth > min_depth: if current_depth <= max_depth: out.write("</ol>\n")
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 19 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
version: | stable → trunk |
Note: See
TracTickets for help on using
tickets.
Duplicate of #23