Closed
Bug 956567
Opened 10 years ago
Closed 10 years ago
[prettify] Pretty print in the debugger produces invalid js
Categories
(DevTools :: Debugger, defect, P3)
DevTools
Debugger
Tracking
(Not tracked)
VERIFIED
FIXED
Firefox 30
People
(Reporter: vporof, Assigned: brion)
References
Details
Attachments
(1 file, 1 obsolete file)
1.26 KB,
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
STR: 1. Go to http://todomvc.com/labs/dependency-examples/enyo_backbone/ 2. Open debugger 3. Make sure app.js is selected and pretty printed Line 4144 looks like this: h.innerHTML = ' <link/><table></table><a href='/a'>a</a><input type='checkbox'/>', Let me break that down for you: foo.bar = "str" /a "str" checkbox "str" This makes Parser.jsm sad when searching for functions and doing other smartsy stuff. It's also invalid javascript, but that's a technicality.
Comment 1•10 years ago
|
||
(In reply to Victor Porof [:vp] from comment #0) > It's also invalid javascript, but that's a technicality. lol
Updated•10 years ago
|
Priority: -- → P3
Updated•10 years ago
|
Summary: Pretty print in the debugger produces invalid js → [prettify] Pretty print in the debugger produces invalid js
Assignee | ||
Comment 2•10 years ago
|
||
This looks like the same as bug 964103.
Assignee | ||
Comment 4•10 years ago
|
||
Patch to escape single quotes in strings in the debugger's pretty printer. Resolves round-tripping issues with strings like 'Can\'t' or "Can't"; both now turn into correct 'Can'\t' instead of broken 'Can't'.
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8374048 [details] [diff] [review] prettyprint-singlequote-escape.patch Please feel free to bump review around, I'm a bit unclear on the protocol here. :) Thanks!
Attachment #8374048 -
Flags: review?(nfitzgerald)
Assignee | ||
Comment 6•10 years ago
|
||
And here's a pull req on the separate pretty-fast repo on github: https://github.com/mozilla/pretty-fast/pull/3
Comment 7•10 years ago
|
||
Copying comment from github for posterity: """ Thanks for taking this on Brion. 1. Tests are failing. At a glance it looks like pretty fast is giving the correct output but the test needs to be updated. Make sure that the tests are passing (via npm test on the command line) before updating this pull request. 2. We need a test that specifically tests that we escape single quotes properly. I think actually updating the test failing above would be perfect. Embarrassingly enough, I think that test is asserting the incorrect behavior that your patch is fixing! Woops! """
Assignee: nobody → brion
Status: NEW → ASSIGNED
Updated•10 years ago
|
Attachment #8374048 -
Flags: review?(nfitzgerald)
Assignee | ||
Comment 8•10 years ago
|
||
Updated patch which also updates the test case for the fix. Added a second commit to pull req version with this fix as well: https://github.com/mozilla/pretty-fast/pull/3
Attachment #8374801 -
Flags: review?(nfitzgerald)
Comment 9•10 years ago
|
||
Comment on attachment 8374801 [details] [diff] [review] prettyprint-singlequote-escape2.patch Review of attachment 8374801 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8374801 -
Flags: review?(nfitzgerald) → review+
Updated•10 years ago
|
Keywords: checkin-needed
Updated•10 years ago
|
Attachment #8374048 -
Attachment is obsolete: true
Comment 10•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/b7240f73df3f Brion, please make sure that future patches follow the guidelines below. Makes life easier for those landing on your behalf :) https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Assignee | ||
Comment 11•10 years ago
|
||
Thanks! *bookmarked & .hgrc edited*
https://hg.mozilla.org/mozilla-central/rev/b7240f73df3f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 30
Updated•10 years ago
|
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•