Skip to content

Commit bf34723

Browse files
authored
Fix: Abnormal strings appear when comments are saved after editing (#29991)
Partially resolved(The second problem): [#29986](#29986) **Before** HTML strings appear when comments are saved after editing ![image](https://github.com/go-gitea/gitea/assets/37935145/c356d99a-8473-4cc5-8e38-1b207ccd8b12) **After** https://github.com/go-gitea/gitea/assets/37935145/525601f9-3ee1-4266-9105-36d82b91b1c8
1 parent 226231e commit bf34723

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/features/repo-legacy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ async function onEditContent(event) {
436436
const $content = $segment;
437437
if (!$content.find('.dropzone-attachments').length) {
438438
if (data.attachments !== '') {
439-
$content[0].append(data.attachments);
439+
$content[0].insertAdjacentHTML('beforeend', data.attachments);
440440
}
441441
} else if (data.attachments === '') {
442442
$content.find('.dropzone-attachments').remove();

0 commit comments

Comments
 (0)