Port templates to NodeBB 4.14 benchpress escaping #19

Merged
archvillainette merged 1 commits from port-nodebb-4.14 into main 2026-07-11 18:30:34 +00:00
Member

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

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)
gitea-bot added 1 commit 2026-07-11 18:25:35 +00:00
NodeBB 4.14 registers a real __escape for template rendering (4.13 used
identity), so raw-HTML output must use the double-brace forms:
- HTML helpers: {{buildAvatar(...)}}, {{buildCategoryIcon(...)}}, etc.
- Pre-rendered HTML fields: {{txEscape(content)}} / {{./descriptionParsed}}
- Token-bearing text (nav labels, category names): {{tx(...)}}
- emails/partials/post-queue-body.tpl also adopts the 4.14 data shape
  (notification.category/topic/user/content).

Mirrors the harmony 2.2.72 -> 3.0.15 and core 4.13.2 -> 4.14.0 diffs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
xtul approved these changes 2026-07-11 18:30:25 +00:00
archvillainette merged commit edc586d9bb into main 2026-07-11 18:30:34 +00:00
archvillainette deleted branch port-nodebb-4.14 2026-07-11 18:30:34 +00:00
Sign in to join this conversation.