Closed
Bug 1305859
Opened 9 years ago
Closed 9 years ago
Single-commit TreeHerder view has HTML-encoding junk for special characters in <title> (e.g. the word "Don't" instead of "Don't")
Categories
(Tree Management :: Treeherder, defect)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: KWierso)
Details
Attachments
(3 files)
STR:
1. Visit https://treeherder.mozilla.org/#/jobs?repo=try&revision=afc4f662467c926ea40bb5b35c05cdae3e6ab3e0 (or the TreeHerder page for any Try run with a single-quote early in the commit message)
2. Look at the page title, in your browser's title bar.
EXPECTED RESULTS:
The page title should have the commit message, including the word "Don't".
ACTUAL RESULTS:
The page title has the word "Don't" with HTML-encoding junk in it.
I understand that we need to encode special characters, for security reasons. I don't immediately see why that encoded special character is showing up in the actual rendered <title>, though. If it's properly encoded & set, it should still be rendered as a single-quote character in the title bar -- not as Don't.
| Reporter | ||
Updated•9 years ago
|
Summary: Single-commit TreeHerder view has HTML-encoding junk for special characters in <title> → Single-commit TreeHerder view has HTML-encoding junk for special characters in <title> (e.g. the word "Don't" instead of "Don't")
| Reporter | ||
Comment 1•9 years ago
|
||
For comparison, here's a simple page with a title that includes "'" (in the word "Here's") This renders as a nice single-quote in my titlebar, unlike TreeHerder.
| Reporter | ||
Comment 2•9 years ago
|
||
Here's a screenshot, showing that the HTML encoding of the single-quote character is cluttering up the page title in Firefox and Chrome (circled in red), though it renders correctly in the page body (circled in green).
Comment 3•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → wkocher
| Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8795527 [details] [review]
[treeherder] KWierso:singletitleescape > mozilla:master
I'm not sure if anything would break by doing this, but it appears to properly render the apostrophe in the linked push.
Attachment #8795527 -
Flags: review?(wlachance)
| Assignee | ||
Comment 5•9 years ago
|
||
I could change ui/index.html from using ng-bind="getWindowTitle()" to using ng-bind-html="getWindowTitle()", but that seems riskier. (Could it somehow close off the title tag and write arbitrary HTML?)
Comment 6•9 years ago
|
||
Comment on attachment 8795527 [details] [review]
[treeherder] KWierso:singletitleescape > mozilla:master
This looks very sane to me! I think this is the right solution -- I don't think using ng-bind-html in this case is warranted (I doubt it would even work).
Attachment #8795527 -
Flags: review?(wlachance) → review+
Comment 7•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/faf871536b21140d124413bc74faf267f96b5963
Bug 1305859 - Make sure HTML-encoded characters render correctly in the title (#1877) r=wlach
| Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•