Opened 10 years ago

Closed 9 years ago

#1545 closed defect (fixed)

Tag Index broken for Tag wiki pages with a tilte containing quotes

Reported by: anonymous Owned by: athomas
Priority: normal Component: TagsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10


Env: Trac 0.10.3, TracTags 0.4 (, Python 2.4


For the Tag AOP there exist a wiki page with the name AOP. The tag AOP than doesn't link to the normal tag list (trac.cgi/tags/'AOP'), but to the AOP wiki page (trac.cgi/wiki/AOP)

If the wiki page contains the title

= [wiki:"Aspect-Oriented Programming"] ([wiki:AOP]) =

the Tags page (trac.cgi/tags) is broken because the list entry becomes

<li><a rel="tag" title="[wiki:"Aspect-Oriented Programming"] ([wiki:AOP])  (4)" style="font-size: 11px" href="/cgi-bin/trac.cgi/wiki/AOP">AOP</a></li>

There is no error message in the log an the list entry is not visible in the HTML sources.

It happens in tractags/ (around line 126) in out.write(...).

Maybe it would be sufficient to quote taginfo[tag][1]. A quick experiment with {{{urllib.quote()}} didn't yield the desired result.

Attachments (1)

1545_tags_quoted_title.patch (615 bytes) - added by pacopablo 10 years ago.
Patch to escape quotes in titles

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by athomas

  • Reporter changed from… to anonymous

comment:2 Changed 10 years ago by anonymous

Applies as well to render_listtagged() in tractags/

Probably all occurrences of taginfo[tag][1] are at risk (if they are used as a quoted XML/HTML attribute)

Changed 10 years ago by pacopablo

Patch to escape quotes in titles

comment:3 Changed 10 years ago by pacopablo

OK, I attached a simple patch that converts double quotes to single quotes. It's not exactly ideal, but I don't think there is another solution. The biggest issue being that entities and escaped values aren't rendered in the tool tips.

Anyway, it works for me.

comment:4 Changed 9 years ago by athomas

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

This is no longer an issue because page titles aren't rendered in 0.6.

Add Comment

Modify Ticket

as closed The owner will remain athomas.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.