]> git.maquefel.me Git - brevno-suite/hugo/commit
tpl: Fix stray quotes from partial decorator in script context
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 3 Apr 2026 14:04:54 +0000 (16:04 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 3 Apr 2026 16:30:26 +0000 (18:30 +0200)
commit43aad7118da6f8365d9cdb4aaada1878ce68fb98
tree21c11e32d1aac57eec98257f5b7d952d020bb7ee
parent9f1f1be0be2e5b8280e16df647d838c538edb9c2
tpl: Fix stray quotes from partial decorator in script context

Use template.JS for the falsy return value of _PopPartialDecorator
so Go's html/template JS escaper doesn't wrap the empty string in
quotes inside <script> tags.

Fixes #14711

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tpl/templates/decorator_falsy_test.go
tpl/templates/templates.go