Convert editor panel <script> block to sexp wrapper
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m4s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m4s
Separate JS content from HTML tag — pass JS body into (script (raw! js)) so zero raw HTML tags remain. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1663,10 +1663,8 @@ def render_editor_panel(save_error: str | None = None, is_page: bool = False) ->
|
||||
ecss=editor_css,
|
||||
))
|
||||
|
||||
# Editor JS + init script — kept as raw HTML due to complex JS with quotes
|
||||
parts.append(sexp('(script :src ejs)', ejs=editor_js))
|
||||
parts.append(
|
||||
"<script>\n"
|
||||
# Editor JS + init script
|
||||
init_js = (
|
||||
"(function() {\n"
|
||||
" function applyEditorFontSize() {\n"
|
||||
" document.documentElement.style.fontSize = '62.5%';\n"
|
||||
@@ -1796,8 +1794,11 @@ def render_editor_panel(save_error: str | None = None, is_page: bool = False) ->
|
||||
" }, 50);\n"
|
||||
" }\n"
|
||||
"})();\n"
|
||||
"</script>"
|
||||
)
|
||||
parts.append(sexp(
|
||||
'(<> (script :src ejs) (script (raw! js)))',
|
||||
ejs=editor_js, js=init_js,
|
||||
))
|
||||
|
||||
return "".join(parts)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user