From fe5c979b90a09542272505507ca1dbebefa1915c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 10 Jun 2026 20:50:05 -0400 Subject: [PATCH 01/11] fix composer title --- static/lib/composer.js | 13 ++++++------- .../templates/partials/composer-title-container.tpl | 4 ++-- .../templates/partials/composer-write-preview.tpl | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/static/lib/composer.js b/static/lib/composer.js index 8990041..ac341d3 100644 --- a/static/lib/composer.js +++ b/static/lib/composer.js @@ -445,16 +445,15 @@ define('composer', [ const privileges = postData.category ? postData.category.privileges : ajaxify.data.privileges; const topicTemplate = isTopic && postData.category ? postData.category.topicTemplate : ''; + const titleLabel = isEditing ? + await translator.translateKey('topic:composer.editing-in', [`"${postData.title}"`]) : + await translator.translateKey('topic:composer.replying-to', [`"${postData.title}"`]); + let data = { topicTitle: postData.title, titleLength: postData.title.length, - titleLabel: translator.compile( - isEditing ? - 'topic:composer.editing-in' : - 'topic:composer.replying-to', - `"${postData.title}"` - ), - body: utils.escapeHTML(translator.escape(postData.body) || topicTemplate), + titleLabel: titleLabel, + body: postData.body || topicTemplate, mobile: composer.bsEnvironment === 'xs' || composer.bsEnvironment === 'sm', resizable: true, thumb: postData.thumb, diff --git a/static/templates/partials/composer-title-container.tpl b/static/templates/partials/composer-title-container.tpl index c75f294..a853340 100644 --- a/static/templates/partials/composer-title-container.tpl +++ b/static/templates/partials/composer-title-container.tpl @@ -13,9 +13,9 @@
{{{ if isTopicOrMain }}} - + {{{ else }}} - {titleLabel} + {{escapeTxHtml(titleLabel)}} {{{ end }}}