Modify ↓
#23 closed defect (fixed)
Do not URL-encode the anchor sign ('#') to %23
Reported by: | Owned by: | Alec Thomas | |
---|---|---|---|
Priority: | normal | Component: | TocMacro |
Severity: | major | Keywords: | |
Cc: | Trac Release: |
Description (last modified by )
I used revs 44 and 37 in Trac 0.9pre. TocMacro does nicely show the Table of Contents, but the anchor sign is encoded to %23 in links to headings on the referenced page. When the user clicks them, he is guided to a blank page named i.e. 'WikiPage#Heading1'
Attachments (0)
Change History (8)
comment:1 Changed 19 years ago by
comment:2 Changed 19 years ago by
I fixed this on my system; line66: link = page + ""#"" + anchor Don't know wether that's proper python-code, but works.
comment:3 Changed 19 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 19 years ago by
In my TOC.py the line 66 is as described by the comment above, but the problem with '%23' occurs anyway (trac 0.9pre).
comment:5 Changed 19 years ago by
Close. All that did was remove the anchor altogether.
This works though:
link = page if current_depth <= max_depth: out.write('<a href="%s#%s">%s</a></li>\n' % (env.href.wiki(link), anchor, header))
comment:7 Changed 19 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I'm surprised TocMacro works in trunk at all. The encoding must be a side-effect of changes introduced in trunk.