Closed Bug 1028903 Opened 8 years ago Closed 7 years ago

Improve anti-self-xss warning message

Categories

(DevTools Graveyard :: Scratchpad, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: jwalker, Assigned: manishearth, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

See bug 994134 comment 78 and 79.
I'll do this today or tomorrow.
Assignee: nobody → manishearth
Status: NEW → ASSIGNED
Blocks: dev-self-xss
Summary: Improve anti-self-xs warning message → Improve anti-self-xss warning message
Blocks: 994134, 1046672
I didn't add the bolding (It would require either putting HTML in the l10n file, or having a couple more strings), but if you want I can add it.
Attachment #8469865 - Flags: review?(jwalker)
Comment on attachment 8469865 [details] [diff] [review]
Add separate message for scratchpad

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

::: toolkit/devtools/webconsole/utils.js
@@ +561,5 @@
>     * @param nsIDOMElement notificationBox
>     * @returns A function to be added as a handler to 'paste' and 'drop' events on the input field
>     */
> +  pasteHandlerGen: function WCU_pasteHandlerGen(inputField, notificationBox, l10nURL) {
> +    let l10nBundle = new WebConsoleUtils.l10n(l10nURL);

Rather than construct a new WebConsoleUtils.l10n object here, please could you pass in 'msg'.

webconsole.js already has a module variable for the Strings object, but we'll need to add one to scratchpad, I think.

It's a bit more code duplication, but the l10n objects can be fairly heavyweight, so I think it's justified.
Attachment #8469865 - Flags: review?(jwalker) → review+
Comment on attachment 8472972 [details] [diff] [review]
Patch, strings passed to handler generator

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

Thanks, Manish
Attachment #8472972 - Flags: review?(jwalker) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/17485987eef9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.