Skip to content

Instantly share code, notes, and snippets.

@iamspark1e
Created September 7, 2023 08:10
Show Gist options
  • Save iamspark1e/f3a8d23a847969f05218b5c53a134c06 to your computer and use it in GitHub Desktop.
Save iamspark1e/f3a8d23a847969f05218b5c53a134c06 to your computer and use it in GitHub Desktop.
// fit for concat html property
function escapeQuotes(raw, escape_double, escape_single) {
if(escape_double) raw = raw.replace(/"/g, """);
if(escape_single) raw = raw.replace(/'/g, "\'");
return raw;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment