Browse Source

Fix 86888h53w

KernelDeimos 1 year ago
parent
commit
4d2d4a7ca3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/backend/src/temp/puter_page_loader.js

+ 5 - 1
packages/backend/src/temp/puter_page_loader.js

@@ -161,7 +161,11 @@ const generate_puter_page_html = ({
     <!-- Initialize GUI when document is loaded -->
     <script>
     window.addEventListener('load', function() {
-        gui(${JSON.stringify(gui_params)});
+        gui(${
+            // TODO: override JSON.stringify to ALWAYS to this...
+            //       this should be an opt-OUT, not an opt-IN!
+            JSON.stringify(gui_params).replace(/</g, '\\u003c')
+        });
     });
     </script>
     <div id="templates" style="display: none;"></div>