fix string escaping

This commit is contained in:
end-4
2025-05-07 23:48:24 +02:00
parent 47a8149968
commit 0a331061c3
3 changed files with 21 additions and 14 deletions
@@ -10,9 +10,9 @@ function getDomain(url) {
}
function shellSingleQuoteEscape(str) {
// First escape backslashes, then escape single quotes
// escape single quotes
return String(str)
.replace(/\\/g, '\\\\')
// .replace(/\\/g, '\\\\')
.replace(/'/g, "'\\''");
}
@@ -33,7 +33,3 @@ function splitMarkdownBlocks(markdown) {
}
return result;
}
function unEscapeBackslashes(str) {
return str.replace(/\\\\/g, '\\');
}