Closed
Bug 234264
Opened 22 years ago
Closed 22 years ago
Queries with some special characters have titles with entities
Categories
(Bugzilla :: Query/Bug List, defect)
Bugzilla
Query/Bug List
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: Waldo, Assigned: Waldo)
Details
Attachments
(1 file)
|
631 bytes,
patch
|
gerv
:
review+
|
Details | Diff | Splinter Review |
Make a query. Save it with a name that includes " or @. The query will display
correctly on the page, but in the title bar they are displayed as HTML entities.
For example, this query:
` ~ bob " hi ' @ # ! $ % ^ * ( ) { } [ ] + = - _ | \ / ? ` ~ : ;
becomes this when shown in the title bar of browsers:
` ~ bob " hi ' @ # ! $ % ^ * ( ) { } [ ] + = - _ | \ / ? ` ~ : ;
(I also tried including the characters <, &, and >, but I got an error message
that they weren't allowed in query names, apparently by design.) From the looks
of this, it's pretty likely that " and & are the only misdisplayed characters in
titles. Once again, the query did display correctly on the page. I tested this
on landfill on the tip, but I noticed the original problem on b.m.o with a query
with " in it.
| Assignee | ||
Comment 1•22 years ago
|
||
Sorry, make that " and @ that appear to not work.
Comment 2•22 years ago
|
||
Just for the fun of it, try that on Landfill again and see if it still happens
there. (I just made a small modification there to see if it affects it)
| Assignee | ||
Comment 3•22 years ago
|
||
The problem is still on bugzilla-tip. Existing queries still mis-displayed the
titles, and deleing all old custom queries and remaking the test query still
resulted in the entities being shown in it for " and @.
Comment 4•22 years ago
|
||
OK, not a charset issue then. :) (What I did was set the webserver to send a
charset in the Content-Type header). Probably something's getting escaped that
shouldn't be (obviously). Gerv's been messing with the saved query code
recently, maybe he has an idea.
Comment 5•22 years ago
|
||
It'll be a double-escaping issue, I'm sure. header.html.tmpl escapes titles, so
you are supposed to pass them unescaped. I'll look into it.
Gerv
Assignee: justdave → gerv
| Assignee | ||
Comment 6•22 years ago
|
||
I decided to browse the source a little to see if I could fix this. A few
searches revealed this as the location where the search name is added as page
title:
http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/template/en/default/list/list.html.tmpl#34
This is FILTER html'd, so as mentioned earlier there was another place where
FILTER html was happening to the title. That location was:
http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/template/en/default/global/header.html.tmpl#62
in the global header file. This patch simply removes the FILTER html of
searchname when setting title, because title is later FILTER html'd in the
global header. While searching I also stumbled across the code for the html
filter, located here:
http://lxr.mozilla.org/mozilla/source/webtools/bugzilla/Bugzilla/Template.pm#288
The code just uses the generic html filter provided by Template Toolkit (which
converts &,>,<, and " to entities), and then it replaces the @ symbol with its
HTML entity. As &/>/< are forbidden in search names, it explains why only @
and " and no other symbols were being "entitized."
Anyways, hope this patch is what you want. (I read the Developer's Guide and
tried to get this patch to fit the guidelines - "base Bugzilla directory" was a
little unclear to me, so I took my best guess as to location.)
| Assignee | ||
Updated•22 years ago
|
Attachment #141927 -
Flags: review?(gerv)
Comment 7•22 years ago
|
||
Comment on attachment 141927 [details] [diff] [review]
Removes FILTER html of searchname in title
Nice work :-) r=gerv.
Gerv
Attachment #141927 -
Flags: review?(gerv) → review+
Updated•22 years ago
|
Assignee: gerv → Jswalden86
Flags: approval+
Comment 8•22 years ago
|
||
Checking in list.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.html.tmpl,v <-
- list.html.tmpl
new revision: 1.22; previous revision: 1.21
done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•