Closed Bug 1156114 Opened 9 years ago Closed 9 years ago

Incorrectly escaped regexp in browser/app/profile/firefox.js - warning preserving unexpected JS escape sequence: file modules/libpref/prefread.cpp, line 393

Categories

(Firefox :: Tours, defect)

defect
Not set
normal
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 40
Iteration:
40.2 - 27 Apr
Tracking Status
firefox40 --- fixed

People

(Reporter: asqueella, Assigned: jaws)

References

Details

Attachments

(1 file)

In browser/app/profile/firefox.js:255 <http://hg.mozilla.org/mozilla-central/annotate/a32e3b93c8d8/browser/app/profile/firefox.js#l254>

> pref("browser.uitour.readerViewTrigger", "^https:\/\/www\.mozilla\.org\/[^\/]+\/firefox\/reading\/start");

(added in bug 1134501) triggers 9 warnings on a startup in a debug build:

WARNING: preserving unexpected JS escape sequence: file modules/libpref/prefread.cpp, line 393

Backslashes are supposed to be escaped in pref files. I'm guessing "https:\\/\\/" and so on, but I didn't test.

(a similar case was recently fixed in bug 1146097)
Attached patch PatchSplinter Review
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Attachment #8594547 - Flags: review?(jruderman)
Iteration: --- → 40.2 - 27 Apr
Points: --- → 1
Flags: qe-verify-
Flags: firefox-backlog+
OS: Mac OS X → All
Hardware: x86 → All
Comment on attachment 8594547 [details] [diff] [review]
Patch

Review of attachment 8594547 [details] [diff] [review]:
-----------------------------------------------------------------

Looks right to me. I think it would also work with / in place of \\/, since you call the RegExp constructor rather than eval'ing a literal delimited by slashes.
Attachment #8594547 - Flags: review?(jruderman) → review+
Thanks for the r+. I'll leave it as-is for now wrt the backslashes being necessary.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6a29dd1152df
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: