diff --git a/src/core.js b/src/core.js index 93fe25568..5330a894b 100644 --- a/src/core.js +++ b/src/core.js @@ -1019,6 +1019,7 @@ $.extend( $.validator, { // meta-characters that should be escaped in order to be used with JQuery // as a literal part of a name/id or any selector. escapeCssMeta: function( string ) { + if (string === undefined) return ""; return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" ); },