1. Use `textContent` instead of `innerHTML` to fix https://github.com/go-gitea/gitea/security/code-scanning/170. 2. Clean up surrounding code to remove unnecessary `if` checks on elements that are guaranteed to exist. --------- Co-authored-by: Claude (Opus 4.6) <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>