« get me outta code hell

language: don't sanitize anything automatically - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-07-11 09:49:40 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-07-11 09:49:40 -0300
commitbdfe6bb38ee407c31742609a28e515880de79e31 (patch)
treee2cf84740be03d7ba48224477521100d9d78b449
parentbe49e860a817109cb446a5c97eb01fdb952803f7 (diff)
language: don't sanitize anything automatically preview
This will have no unforeseen consequences.
Which is to say, no consequences.
-rw-r--r--src/data/things/language.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/data/things/language.js b/src/data/things/language.js
index 84e7a946..8d102a67 100644
--- a/src/data/things/language.js
+++ b/src/data/things/language.js
@@ -388,21 +388,13 @@ export class Language extends Thing {
       partInProgress += template.slice(lastIndex, match.index);
 
       for (const insertionItem of html.smush(insertion).content) {
-        // Sanitize string arguments in particular. These are taken to come from
-        // (raw) data and may include special characters that aren't meant to be
-        // rendered as HTML markup.
-        // (XXX: This actually sanitizes every value, stringifying numbers
-        //  and booleans also. We haven't checked what impact that has.)
-        const sanitizedInsertionItem =
-          this.#sanitizeValueForInsertion(insertionItem);
-
-        if (typeof sanitizedInsertionItem === 'string') {
+        if (typeof insertionItem === 'string') {
           // Join consecutive strings together.
-          partInProgress += sanitizedInsertionItem;
+          partInProgress += insertionItem;
         } else {
           // Push the string part in progress, then the insertion as-is.
           outputParts.push(partInProgress);
-          outputParts.push(sanitizedInsertionItem);
+          outputParts.push(insertionItem);
           partInProgress = '';
         }
       }