add another escaping function for another characterset

This commit is contained in:
Mystikfluu
2022-07-03 21:34:22 +02:00
parent 0f49d4f023
commit 7e309850ef
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -35,3 +35,11 @@ const unes = {
const cape = m => unes[m];
const unescape = un => replace.call(un, es, cape);
function escape_special(str) {
return str.replace("\\","\\\\").replace("`","\\`")
}
function unescape_special(str) {
return str.replace("\\\\","\\").replace("\\`","`")
}