Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4089 closed defect (fixed)

Ticket title double-escapes entities

Reported by: Tim Hatch <trac@…> 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 -&gt; in the source). It displays incorrectly in the title of /ticket/nnn (as -&amp;gt; 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 Tim Hatch <trac@…>, 18 years ago

Oh, forgot to mention that it's unescaped in the database:

sqlite> select summary from ticket where id=nn;
Summary of ticket with -> here

comment:2 by Tim Hatch <trac@…>, 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 Christian Boos, 18 years ago

Component: ticket systemgeneral
Milestone: 0.11
Severity: normalminor

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 Christopher Lenz, 18 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

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 Christopher Lenz, 18 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in [4165].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.