Fix incomplete HTML escaping in reply textarea (ticket.js)
Line 1575 used .replace(/</g, '<').replace(/>/g, '>') to set the comment-raw edit textarea content, missing '&' → '&'. Replaced with lt.escHtml() which escapes all five special HTML characters (&, <, >, ", ') consistently with the rest of the codebase. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1572,7 +1572,7 @@ function submitReply(parentCommentId) {
|
||||
<div class="comment-text" id="comment-text-${data.comment_id}" ${isMarkdownEnabled ? 'data-markdown' : ''}>
|
||||
${displayText}
|
||||
</div>
|
||||
<textarea class="comment-edit-raw is-hidden" id="comment-raw-${data.comment_id}">${commentText.replace(/</g, '<').replace(/>/g, '>')}</textarea>
|
||||
<textarea class="comment-edit-raw is-hidden" id="comment-raw-${data.comment_id}">${lt.escHtml(commentText)}</textarea>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user