Ticket #23 (closed defect: fixed)

Opened 7 years ago

Last modified 2 years ago

Do not URL-encode the anchor sign ('#') to %23

Reported by: richter@jakota.de Assigned to: athomas
Priority: normal Component: TocMacro
Severity: major Keywords:
Cc: Trac Release:

Description (Last modified by athomas)

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

Change History

07/28/05 02:53:46 changed by athomas

I'm surprised TocMacro works in trunk at all. The encoding must be a side-effect of changes introduced in trunk.

08/18/05 16:55:32 changed by anonymous

I fixed this on my system; line66: link = page + ""#"" + anchor Don't know wether that's proper python-code, but works.

08/19/05 02:26:48 changed by athomas

  • description changed.

08/20/05 22:29:49 changed by anonymous

In my TOC.py the line 66 is as described by the comment above, but the problem with '%23' occurs anyway (trac 0.9pre).

09/02/05 08:01:50 changed by ebrown@esolvere.com

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))

09/05/05 10:16:22 changed by richter@jakota.de

Thank you, ebrown. This works for me, too.

09/08/05 02:01:10 changed by athomas

  • status changed from new to closed.
  • resolution set to fixed.

(In [111])

  • First version of TocMacro for trunk
  • Fix for finding current page, closes #50
  • Fix for anchor escaping, closes #23

01/09/06 15:35:23 changed by athomas

  • milestone deleted.

Milestone 0.9 deleted


Add/Change #23 (Do not URL-encode the anchor sign ('#') to %23)




Change Properties
Action