[FIXED] Stray letter "s" causing script error?

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

[FIXED] Stray letter "s" causing script error?

Post by barbaz »

When pasting something into, say, this forum's reply textbox, I get the following console message -

Code: Select all

ReferenceError: s is not defined[Learn More]PasteHandler.jsm:21:1
Clicked to look at line 21, and odd as it may seem, line 21 is literally just the letter "s". Here it is in context -

Code: Select all

function pasteEventHandler(e) {
  Cu.import("resource://gre/modules/Services.jsm");
  if (!Services.prefs.getBoolPref("noscript.sanitizePaste")) {
    return;
  }
  let data = e.clipboardData;
  let html =  data.getData("text/html");
  let t = e.target;
  if (t.nodeType !== 1) t = t.parentElement;
    
  let console = t.ownerDocument.defaultView.console;
s
  try {
    let node = t.cloneNode();

    node.innerHTML = html;
    
    if (sanitizeExtras(node)) {
      let sanitized = node.innerHTML;
      Cu.import("chrome://noscript/content/defer.jsm");
      defer(function() { try {
        sanitizeExtras(t);
        console.log("[NoScript] Sanitized\n<PASTE>\n" + html + "\n</PASTE>to\n<PASTE>\n" + sanitized + "</PASTE>");
      } catch(ex) {
       console.log(ex);
      }}, 0);
    }
  } catch(ex) {
    console.log(ex);
  }
}
NoScript 2.9.5rc27
SeaMonkey 2.46pre (like Firefox 49.0.2)
Linux x86_64
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Giorgio Maone
Site Admin
Posts: 9528
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Stray letter "s" causing script error?

Post by Giorgio Maone »

Fixed in latest development build rc29, thank you.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0
barbaz
Senior Member
Posts: 11109
Joined: Sat Aug 03, 2013 5:45 pm

Re: [FIXED] Stray letter "s" causing script error?

Post by barbaz »

Thanks Image
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply