Every line of 'jquery escape quotes' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
43 function escapeSingleQuote (string) { 44 if (typeof string !== 'string') { 45 return string 46 } 47 return string.replace(/'/g, '\\\'') 48 }
9 export function escapeQuotes(value, defaultValue = '') { 10 return value ? value.replace(/(^|[^\\])"/g, '$1\\\"') : defaultValue; 11 }
9 function escapeSingleQuotes (value) { 10 return value.replace(/'/g, ''') 11 }
51 export function escapeDoubleQuotes(string) { 52 return string.replace(/\"/g, '\\$&'); 53 }
7 function safeEscapeQuotes(str) { 8 return str.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\\([\s\S])|(")/g,"\\$1$2"); // escape only if not escaped already 9 }
40 function quoteEscape(s) 41 { 42 s = s.replace(/"/g,'"'); 43 return s; 44 }
1 export function escapeQuotes(input: string) { 2 // double escape quotes so that they are not unescaped completely in the template string 3 return input.replace(/"/g, '\\"'); 4 }
111 function escapeDoubleQuote(str) { 112 return String(str) 113 .replace(/"/g, '\\\"'); 114 }
6 function escapeDoubleQuotes (value) { 7 return value.replace(/"/g, '"') 8 }
1143 function escapeValue(value) { 1144 return value && value.replace(/['"`\\/:\?&!#$%^()[\]{|}*+;,.<=>@~]/g, '\\$&'); 1145 }