Opened 18 years ago
Closed 18 years ago
#4089 closed defect (fixed)
Ticket title double-escapes entities
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | general | Version: | devel |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I have a ticket that contains a little ascii arrow "->
" (i.e. hyphen followed by greater-than). This displays correctly in the timeline view, search, and in the page itself, (as ->
in the source). It displays incorrectly in the title of /ticket/nnn
(as ->
in the source). I tried to track it down, but I think it's buried somewhere deep in ticket/model.py, as ticket_view.html just references ticket.summary
. Lines 95-96 in ticket/model.py look completely normal.
Attachments (0)
Change History (5)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Aha! After looking some more, I think it's perhaps related to lines 10-12 of templates/layout.html — is select('title/text()') returning the escaped version, which is being re-escaped when used as text?
comment:3 by , 18 years ago
Component: | ticket system → general |
---|---|
Milestone: | → 0.11 |
Severity: | normal → minor |
Yes, this comes from the
<title py:with="title = unicode(select('title/text()'))">
line, the unicode()
call in particular.
This was introduced by r3866, but nothing specific about the need for the unicode()
call was written in the commit message. Maybe cmlenz could comment on this?
PS: Tim, you could use `...`
Wiki syntax for inline code formatting, instead of the more verbose {{{...}}}
.
comment:4 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I'll look into this.
(The unicode()
there is necessary to flatten the event stream to a string, but there's probably a better way to do that.)
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Should be fixed in [4165].
Oh, forgot to mention that it's unescaped in the database: