From ae2b1c56649ddf7f036aa0f16aba1f40a44c45c0 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 16 Jul 2026 09:18:20 -0400 Subject: [PATCH] fix: use backslash-escape for single quotes (not HTML entity) HTML entities like ' are decoded by the browser BEFORE Alpine evaluates the expression, so the JS parser still sees a raw single quote. Backslash escape (\') is the correct approach: the HTML parser preserves it, then JavaScript interprets \' as an escaped quote in the string literal. --- app/templates/_workspace_tree_macro.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/_workspace_tree_macro.html b/app/templates/_workspace_tree_macro.html index 3fdc1c3..d49c463 100644 --- a/app/templates/_workspace_tree_macro.html +++ b/app/templates/_workspace_tree_macro.html @@ -1,6 +1,6 @@ {% macro render_workspace_tree(pages, depth=0) %} {% for page in pages %} - {% set safe_name = page.name | replace("'", "'") %} + {% set safe_name = page.name | replace("'", "\\'") %}