Closed
Bug 369097
Opened 18 years ago
Closed 17 years ago
Only escape % in to-be-evaluated JavaScript code
Categories
(Toolkit Graveyard :: Error Console, defect)
Toolkit Graveyard
Error Console
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9alpha5
People
(Reporter: zeniko, Assigned: zeniko)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
2.07 KB,
patch
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Open the Error Console 2. Evaluate [""]..length Expected result: Error: XML descendants internal method called on incompatible Array Source file: javascript: [""]..length Actual result: Source file: javascript: %5B%22%22%5D..length Suggested solution: Instead of encodeURIComponent, using .replace(/%/g, "%25") should be sufficient (that's what Console² does). From bug 342662 comment #12: If you want to be sure about non-ASCII Unicode characters, what about .replace(/[^\x20-\x24\x26-\x7F]+/g, encodeURI) as a compromise? This encodes everything except printable 7-bit-ASCII characters (% being the exception to the exception). OTOH I haven't seen any bug report to that end so far and we haven't encoded any (Unicode) characters since day 0, so we might just as well escape only that one character (which shouldn't make much of a difference) and wait for further bug reports such as this one [i.e. bug 342662] about other characters.
Assignee | ||
Comment 1•17 years ago
|
||
Updated•17 years ago
|
Attachment #264504 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #264504 -
Flags: superreview?(neil)
Comment 2•17 years ago
|
||
Comment on attachment 264504 [details] [diff] [review] fix Evaluator.location ;-)
Attachment #264504 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 3•17 years ago
|
||
Attachment #264504 -
Attachment is obsolete: true
Assignee | ||
Updated•17 years ago
|
Whiteboard: [checkin needed]
Comment 4•17 years ago
|
||
mozilla/toolkit/components/console/content/console.js 1.9 mozilla/xpfe/components/console/resources/content/console.js 1.28
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox 3 alpha5
Updated•16 years ago
|
Product: Firefox → Toolkit
Updated•8 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•