Page 1 of 1

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

Posted: Tue Nov 15, 2016 12:47 am
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

Re: Stray letter "s" causing script error?

Posted: Tue Nov 15, 2016 12:39 pm
by Giorgio Maone
Fixed in latest development build rc29, thank you.

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

Posted: Tue Nov 15, 2016 5:56 pm
by barbaz
Thanks Image