about summary refs log tree commit diff
path: root/web/panettone
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-01-13T23·03+0100
committersterni <sternenseemann@systemli.org>2022-01-13T23·19+0000
commit0d24efcdc9d00cf1e66e4308facfb94fbbf2dd3d (patch)
tree3cc2a3f51370f68cef5132b8362c8349827298fa /web/panettone
parentbce519256641d200b6f80711fa3081e89f0e6b93 (diff)
fix(web/panettone): make (who:html-mode) stick r/3591
(who:html-mode) needs to be set at macro expansion time to properly take
effect which wasn't the case before, but is ensured now by
:compile-toplevel. :load-toplevel ensures that who inside the repl will
behave the same.

Since the :html5 behavior is now actually used, we need to adjust some
of the test cases to account for the different :html5 escaping mode.

Change-Id: I4dfe1d2db38da6a2486fde86596f7e5f50ed8b9f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4885
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'web/panettone')
-rw-r--r--web/panettone/src/panettone.lisp3
-rw-r--r--web/panettone/test/inline-markdown_test.lisp4
2 files changed, 4 insertions, 3 deletions
diff --git a/web/panettone/src/panettone.lisp b/web/panettone/src/panettone.lisp
index b16171242dde..4c9c7dafee9b 100644
--- a/web/panettone/src/panettone.lisp
+++ b/web/panettone/src/panettone.lisp
@@ -56,7 +56,8 @@
 
 (defvar *title* "Panettone")
 
-(setf (who:html-mode) :html5)
+(eval-when (:compile-toplevel :load-toplevel)
+  (setf (who:html-mode) :html5))
 
 (defun render/nav ()
   (who:with-html-output (*standard-output*)
diff --git a/web/panettone/test/inline-markdown_test.lisp b/web/panettone/test/inline-markdown_test.lisp
index a32464456d48..bb907504368b 100644
--- a/web/panettone/test/inline-markdown_test.lisp
+++ b/web/panettone/test/inline-markdown_test.lisp
@@ -21,7 +21,7 @@
 (inline-markdown-unit-test
   inline-markdown-html-escaping-test
   "<tag>öäü"
-  "&lt;tag&gt;&#246;&#228;&#252;")
+  "&lt;tag&gt;&#xF6;&#xE4;&#xFC;")
 
 (inline-markdown-unit-test
   inline-markdown-nesting-test
@@ -51,4 +51,4 @@
 (inline-markdown-unit-test
   inline-markdown-unicode-safe
   "Does Unicode 👨‍👨‍👧‍👦 break \\👩🏾‍🦰 tokenization?"
-  "Does Unicode &#128104;&#8205;&#128104;&#8205;&#128103;&#8205;&#128102; break \\&#128105;&#127998;&#8205;&#129456; tokenization?")
+  "Does Unicode &#x1F468;&#x200D;&#x1F468;&#x200D;&#x1F467;&#x200D;&#x1F466; break \\&#x1F469;&#x1F3FE;&#x200D;&#x1F9B0; tokenization?")