feat: harden localization against malicious HTML (#5703)

- Add a new script that proccess the localization files and verify that
they only contain HTML according to our strictly defined rules.
- This should make adding malicious HTML near-impossible.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5703
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2024-10-30 15:59:48 +00:00 committed by 0ko
commit dfe3ffc581
43 changed files with 361 additions and 151 deletions

View file

@ -478,7 +478,7 @@ editor.preview_changes=預覽更改
editor.or=
editor.cancel_lower=取消
editor.commit_changes=提交更改嗎?
editor.commit_directly_to_this_branch=直接提交到 <strong class="branch-name">%s</strong> 分支。
editor.commit_directly_to_this_branch=直接提交到 <strong class="%[2]s">%[1]s</strong> 分支。
editor.create_new_branch=建立 <strong>新的分支</strong> 為此提交和開始合併請求。
editor.cancel=取消
editor.no_changes_to_show=沒有可以顯示的變更。