Modify

Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#758 closed defect (worksforme)

Toc links escape "#" to "%23" in 10b1

Reported by: awbacker@… Owned by: coderanger
Priority: normal Component: TocMacro
Severity: major Keywords:
Cc: Trac Release: 0.10

Description

The macro is outputting toc links with an escaped hash/pound/etc in the links, so they lead to pages that do not exist.

To change this it was only necessary to move the wiki link generation. Sorry, I don't know how to submit a patch so it looks pretty.

link = page + "#" + anchor
if current_depth <= max_depth:
   out.write('<a href="%s">%s</a></li>\n' % (link, header))

becomes :

link = env.href.wiki(page) + "#" + anchor
if current_depth <= max_depth:
    out.write('<a href="%s">%s</a></li>\n' % (link, header))

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by athomas

  • Owner changed from athomas to coderanger

comment:2 Changed 7 years ago by cboos

  • Resolution set to worksforme
  • Status changed from new to closed

This works fine in the 0.11 branch of the plugin.
I'm also quite sure it also works in the 0.10 branch, as there, the code is currently:

        out.write('<a href="%s#%s">%s</a>' %
                      (self.href.wiki(page), anchor, heading))

comment:3 Changed 4 years ago by dnedelchev

Just for creating links between a set of related closed tickets:

That seems to be another (late) dupplicate of the long ago fixed #23, like #39.

(noticed it while looking through the TocMcro tickets for an issue)

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.