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

@ -266,7 +266,7 @@ editor.commit_changes=Изврши комит промена
editor.add=Додај '%s'
editor.update=Ажурирај '%s'
editor.delete=Уклони '%s'
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.branch_already_exists=Грана '%s' већ постоји за ово спремиште.