Salve a tutti,
ho scaricato un plugin per jquery che fa l'escape di un id, solo che sto notando che ci sono degli errori e con IE ottengo degli errori. Potete darci un'occhiata per favore?

codice:
jQuery.escape = function jQuery$escape(s) {
  var left = s.split(escape_re, 1)[0];
  if (left == s) return s;
  return left + '\\' +
    s.substr(left.length, 1) +
    jQuery.escape(s.substr(left.length+1));
}
In particolare ottengo l'errore che "length" è nullo sulla riga del substring.

Grazie