« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xupd8.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js
index d71e1ba9..8ee41059 100755
--- a/upd8.js
+++ b/upd8.js
@@ -422,7 +422,7 @@ function genStrings(stringsJSON, defaultJSON = null) {
     // strings from embedding HTML tags or accidentally including characters
     // that throw HTML parsers off.
     for (const key of Object.keys(stringsJSON)) {
-        stringsJSON[key] = escapeAttributeValue(stringsJSON[key]);
+        stringsJSON[key] = he.encode(stringsJSON[key], {useNamedReferences: true});
     }
 
     // It's time to cre8te the actual langauge function!
@@ -1899,7 +1899,9 @@ function stringifyArtistData() {
 }
 
 function escapeAttributeValue(value) {
-    return he.encode(value, {useNamedReferences: true});
+    return value
+        .replaceAll('"', '"')
+        .replaceAll("'", ''');
 }
 
 function attributes(attribs) {