Closed Bug 1103181 Opened 10 years ago Closed 10 years ago

Remove String.prototype.quote

Categories

(Core :: JavaScript: Standard Library, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: evilpie, Assigned: evilpie)

References

(Blocks 1 open bug)

Details

(Keywords: addon-compat, dev-doc-complete, site-compat)

Attachments

(2 files, 3 obsolete files)

No description provided.
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
Attached patch v1 - Remove quote from browser (obsolete) — Splinter Review
I am basically convinced we can remove this here and now. We have almost no uses in the browser and very low add-on usage. No other browser implements this either.
Attached patch v1 - Remove quote from browser (obsolete) — Splinter Review
Attachment #8527034 - Attachment is obsolete: true
Attachment #8527033 - Flags: review?(jorendorff)
Attachment #8527037 - Flags: review?(wjohnston)
Attachment #8527033 - Flags: review?(jorendorff) → review+
Attachment #8527037 - Attachment is obsolete: true
Attachment #8527037 - Flags: review?(wjohnston)
Attachment #8532044 - Flags: review?(rnewman)
Comment on attachment 8532044 [details] [diff] [review] v2 - Remove quote browser/mobile usage I believe pref names are relatively sane, so we don't need to escape anything.
Attachment #8532044 - Attachment description: remove-quote-browser → v2 - Remove quote browser/mobile usage
Comment on attachment 8532044 [details] [diff] [review] v2 - Remove quote browser/mobile usage Review of attachment 8532044 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/chrome/content/config.js @@ +86,5 @@ > return; > } > > // If item already in list, it's being changed, else added > + let item = document.querySelector(".pref-item[name=\"" + aPrefName + "\"]"); I'm not particularly happy removing this quoting without figuring out an alternative: finding another escaping method, or mapping keys in a more sophisticated way that doesn't require escaping. I tested. about:config allows me to create prefs with backslashes and quotes in their names, and there is certainly an extant pattern to have computed pref names like: extensions.bookmarkdeduplicator@foxhatdev.install-event-fired or urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/getkey?client=navclient-auto-ffox2.0& In short: this is a change you need to _prove_ is safe, because I see nothing to suggest that it won't break.
Attachment #8532044 - Flags: review?(rnewman) → review-
Okay let's use CSS.escape there as well. I indeed didn't consider this case. I don't consider about:config to be critical anyway. CSS.escape(' \\"') gives "\ \\\\""
Attachment #8532044 - Attachment is obsolete: true
Attachment #8532111 - Flags: review?(rnewman)
Attachment #8532111 - Flags: review?(rnewman) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Depends on: 1108416
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: