Opened 18 years ago
Closed 17 years ago
#1545 closed defect (fixed)
Tag Index broken for Tag wiki pages with a tilte containing quotes
Reported by: | anonymous | Owned by: | Alec Thomas |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
Env: Trac 0.10.3, TracTags 0.4 (http://trac-hacks.org/svn/tagsplugin/trunk), Python 2.4
Example:
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/macros.py (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)
Change History (5)
comment:1 Changed 18 years ago by
Reporter: | changed from claudius.link@… to anonymous |
---|
comment:2 Changed 18 years ago by
Changed 18 years ago by
Attachment: | 1545_tags_quoted_title.patch added |
---|
Patch to escape quotes in titles
comment:3 Changed 18 years ago by
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 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This is no longer an issue because page titles aren't rendered in 0.6.
Applies as well to
render_listtagged()
intractags/macros.py
Probably all occurrences of
taginfo[tag][1]
are at risk (if they are used as a quoted XML/HTML attribute)