Closed
Bug 303587
Opened 19 years ago
Closed 19 years ago
Bad html entity decode algorithm
Categories
(MailNews Core :: Feed Reader, defect)
MailNews Core
Feed Reader
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: lwchk2001, Assigned: mscott)
Details
Attachments
(1 file)
|
1.20 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Below is feeditem.js lines 345-350: // the subject may contain HTML entities. // Convert these to their unencoded state. i.e. & becomes '&' title = title.replace(/</g, '<'); title = title.replace(/>/g, '>'); title = title.replace(/&/g, '&'); title = title.replace(/"/g, '"'); Since & is decoded prior to ", &quot; will be wrongly decoded to " rather than " So the code should be modified as follows: title = title.replace(/</g, '<'); title = title.replace(/>/g, '>'); title = title.replace(/"/g, '"'); title = title.replace(/&/g, '&'); Reproducible: Always Steps to Reproduce:
| Reporter | ||
Comment 1•19 years ago
|
||
A similar bug is found on the same source file, lines 199-204. Again, switching
the last two lines fix the bug.
// HACK ALERT: before we give up, try to work around an entity escaping bug
in RDF
// See Bug #258465 for more details
itemURI = itemURI.replace(/</g, '<');
itemURI = itemURI.replace(/>/g, '>');
itemURI = itemURI.replace(/&/g, '&');
itemURI = itemURI.replace(/"/g, '"');
| Assignee | ||
Comment 2•19 years ago
|
||
| Assignee | ||
Updated•19 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird1.1
Component: RSS → Feed Reader
Product: Thunderbird → MailNews Core
Target Milestone: Thunderbird1.1 → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•