Port templates to NodeBB 4.14 benchpress escaping (#19)
NodeBB 4.14 turned on real HTML escaping for single-brace template interpolations (4.13 used an identity escape). This ports raw-HTML output to the double-brace forms ({{helper(...)}}, {{txEscape(content)}}, {{tx(name)}}), mirroring the harmony 2.2.72 -> 3.0.15 and core 4.13.2 -> 4.14.0 template diffs. Fixes the escaped-markup breakage on westgate.pw after the 2026.07.11-1 deploy.
Verified on a fresh 4.14.0 dev stack: no escaped tags on /, /categories, /category/2, /topic/1, /search; contract tests pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Reviewed-on: #19
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: gitea-bot <gitea-bot@noreply.git.westgate.pw>
Co-committed-by: gitea-bot <gitea-bot@noreply.git.westgate.pw>
This commit was merged in pull request #19.
This commit is contained in:
@@ -9,17 +9,17 @@
|
||||
<ul id="main-nav" class="wg-topbar__nav-list list-unstyled d-flex align-items-center mb-0">
|
||||
{{{ each navigation }}}
|
||||
{{{ if displayMenuItem(@root, @index) }}}
|
||||
<li class="nav-item {./class}{{{ if ./dropdown }}} dropdown{{{ end }}}" title="{./title}">
|
||||
<a class="nav-link navigation-link wg-topbar__nav-link d-flex gap-2 align-items-center {{{ if ./dropdown }}}dropdown-toggle{{{ end }}}" {{{ if ./dropdown }}} href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" {{{ else }}} href="{./route}"{{{ end }}} {{{ if ./id }}}id="{./id}"{{{ end }}}{{{ if ./targetBlank }}} target="_blank"{{{ end }}} {{{ if ./text }}}aria-label="{./text}"{{{ end }}}>
|
||||
<li class="nav-item {./class}{{{ if ./dropdown }}} dropdown{{{ end }}}" title="{tx(./title)}">
|
||||
<a class="nav-link navigation-link wg-topbar__nav-link d-flex gap-2 align-items-center {{{ if ./dropdown }}}dropdown-toggle{{{ end }}}" {{{ if ./dropdown }}} href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" {{{ else }}} href="{./route}"{{{ end }}} {{{ if ./id }}}id="{./id}"{{{ end }}}{{{ if ./targetBlank }}} target="_blank"{{{ end }}} {{{ if ./text }}}aria-label="{tx(./text)}"{{{ end }}}>
|
||||
{{{ if ./iconClass }}}
|
||||
<i class="fa fa-fw {./iconClass}" data-content="{./content}"></i>
|
||||
{{{ end }}}
|
||||
{{{ if ./text }}}<span class="nav-text text-truncate {./textClass}">{./text}</span>{{{ end }}}
|
||||
{{{ if ./text }}}<span class="nav-text text-truncate {./textClass}">{{tx(./text)}}</span>{{{ end }}}
|
||||
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
||||
</a>
|
||||
{{{ if ./dropdown }}}
|
||||
<ul class="dropdown-menu wg-topbar__dropdown p-1 shadow" role="menu">
|
||||
{./dropdownContent}
|
||||
{{./dropdownContent}}
|
||||
</ul>
|
||||
{{{ end }}}
|
||||
</li>
|
||||
@@ -100,7 +100,7 @@
|
||||
{{{ if displayMenuItem(@root, @index) }}}
|
||||
<a class="wg-topbar__drawer-link {./class}" href="{./route}" {{{ if ./targetBlank }}}target="_blank"{{{ end }}}>
|
||||
{{{ if ./iconClass }}}<i class="fa fa-fw {./iconClass}" aria-hidden="true"></i>{{{ end }}}
|
||||
{{{ if ./text }}}<span class="{./textClass}">{./text}</span>{{{ end }}}
|
||||
{{{ if ./text }}}<span class="{./textClass}">{{tx(./text)}}</span>{{{ end }}}
|
||||
<span component="navigation/count" class="badge rounded-1 bg-primary {{{ if !./content }}}hidden{{{ end }}}">{./content}</span>
|
||||
</a>
|
||||
{{{ end }}}
|
||||
|
||||
Reference in New Issue
Block a user