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:
@@ -1,9 +1,9 @@
|
||||
<ul component="category" class="topics-list westgate-topics-list list-unstyled" itemscope itemtype="http://www.schema.org/ItemList" data-nextstart="{nextStart}" data-set="{set}">
|
||||
|
||||
{{{ each topics }}}
|
||||
<li component="category/topic" class="westgate-topic-row category-item hover-parent d-flex flex-column flex-lg-row align-items-start {function.generateTopicClass}" <!-- IMPORT partials/data/category.tpl -->>
|
||||
<li component="category/topic" class="westgate-topic-row category-item hover-parent d-flex flex-column flex-lg-row align-items-start {generateTopicClass(@value)}" <!-- IMPORT partials/data/category.tpl -->>
|
||||
<link itemprop="url" content="{config.relative_path}/topic/{./slug}" />
|
||||
<meta itemprop="name" content="{function.stripTags, ./title}" />
|
||||
<meta itemprop="name" content="{./title}" />
|
||||
<meta itemprop="itemListOrder" content="descending" />
|
||||
<meta itemprop="position" content="{increment(./index, "1")}" />
|
||||
<a id="{./index}" data-index="{./index}" component="topic/anchor"></a>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="d-flex p-0 col-12 col-lg-7 gap-2 gap-lg-3 pe-2 align-items-start {{{ if config.theme.mobileTopicTeasers }}}mb-2 mb-lg-0{{{ end }}}">
|
||||
<div class="flex-shrink-0 position-relative">
|
||||
<a class="d-inline-block text-decoration-none avatar-tooltip" title="{./user.displayname}" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
|
||||
{buildAvatar(./user, "40px", true)}
|
||||
{{buildAvatar(./user, "40px", true)}}
|
||||
</a>
|
||||
{{{ if showSelect }}}
|
||||
<div class="checkbox position-absolute top-100 start-50 translate-middle-x pt-2 m-0 d-none d-lg-flex" style="max-width:max-content">
|
||||
@@ -51,7 +51,7 @@
|
||||
{{{each ./icons}}}<span class="lh-1">{@value}</span>{{{end}}}
|
||||
|
||||
{{{ if (!template.category || (cid != ./cid)) }}}
|
||||
{buildCategoryLabel(./category, "a", "border")}
|
||||
{{buildCategoryLabel(./category, "a", "border")}}
|
||||
{{{ end }}}
|
||||
|
||||
<span data-tid="{./tid}" component="topic/tags" class="lh-1 tag-list d-flex flex-wrap gap-1 {{{ if !./tags.length }}}hidden{{{ end }}}">
|
||||
@@ -114,12 +114,12 @@
|
||||
{{{ else }}}
|
||||
{{{ if ./teaser.pid }}}
|
||||
<div class="ps-2">
|
||||
<a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{./teaser.user.displayname}">{buildAvatar(./teaser.user, "18px", true)}</a>
|
||||
<a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{./teaser.user.displayname}">{{buildAvatar(./teaser.user, "18px", true)}}</a>
|
||||
<a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./slug}/{./teaser.index}" title="{./teaser.timestampISO}" aria-label="[[global:lastpost]]"></a>
|
||||
</div>
|
||||
<div class="post-content text-xs ps-2 line-clamp-sm-2 lh-sm text-break position-relative flex-fill">
|
||||
<a class="stretched-link" tabindex="-1" href="{config.relative_path}/topic/{./slug}/{./teaser.index}" aria-label="[[global:lastpost]]"></a>
|
||||
{./teaser.content}
|
||||
{{txEscape(./teaser.content)}}
|
||||
</div>
|
||||
{{{ end }}}
|
||||
{{{ end }}}
|
||||
|
||||
Reference in New Issue
Block a user