Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3522 closed defect (fixed)

Results from cross-project search show escaped html tags

Reported by: Kenny Bohle Owned by: anonymous
Priority: normal Component: SearchAllPlugin
Severity: normal Keywords: escape characers html
Cc: Trac Release: 0.11

Description

When running the search on all projects, every result which is generated by the plugin looks similar to this:

project1:<span class="closed">#17</span>: task: Some Task (closed: fixed)

The html <span> tags are still visible because they are escaped by Genshi to (from the html-sourcecode):

<dt><a href="/trac/project1/ticket/17" class="searchable">project1: &lt;span class="closed"&gt;#17&lt;/span&gt;: task: Some Task (closed: fixed)</a></dt>

This display can be fixed by removing the literal string conversion from the searchall.py file and istead using the a "tag" object as return value.

Find attached a diff to show the required modifications.

Attachments (2)

searchall.py.diff (548 bytes) - added by Kenny Bohle 9 years ago.
Patch for searchall.py
searchall.py.2.diff (586 bytes) - added by Dan Sheridan 9 years ago.
Alternative patch which works with Trac 0.10

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by Kenny Bohle

Attachment: searchall.py.diff added

Patch for searchall.py

comment:1 Changed 9 years ago by Russ Tyndall

Just wanted to add a note that I applied this patch and it worked for me as well.

Russ

Changed 9 years ago by Dan Sheridan

Attachment: searchall.py.2.diff added

Alternative patch which works with Trac 0.10

comment:2 Changed 9 years ago by anonymous

Owner: changed from Álvaro Iradier to anonymous
Status: newassigned

comment:3 Changed 9 years ago by Álvaro Iradier

Thanks, does the alternative patch work on both 0.10 and 0.11?

comment:4 Changed 8 years ago by anonymous

Resolution: fixed
Status: assignedclosed

comment:5 Changed 8 years ago by Álvaro Iradier

(In [5454]) Use Markup to avoid Genshi escaping, closes #3522

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.