Skip to content

Commit

Permalink
Fix: Abnormal strings appear when comments are saved after editing (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
HEREYUA authored Mar 22, 2024
1 parent 226231e commit bf34723
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/features/repo-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ async function onEditContent(event) {
const $content = $segment;
if (!$content.find('.dropzone-attachments').length) {
if (data.attachments !== '') {
$content[0].append(data.attachments);
$content[0].insertAdjacentHTML('beforeend', data.attachments);
}
} else if (data.attachments === '') {
$content.find('.dropzone-attachments').remove();
Expand Down

0 comments on commit bf34723

Please sign in to comment.