gitea/modules
Alexander Scheel 1bf9e44bda
Fix sanitizer config - multiple rules ()
In , it was reported that my earlier pull request  didn't quite function as expected. I was quite hopeful the `ValuesWithShadow()` worked as expected (and, I thought my testing showed it did) but I guess not. @zeripath proposed an alternative syntax which I like:

```ini
[markup.sanitizer.1]
ELEMENT=a
ALLOW_ATTR=target
REGEXP=something
[markup.sanitizer.2]
ELEMENT=a
ALLOW_ATTR=target
REGEXP=something
```

This was quite easy to adopt into the existing code. I've done so in a semi-backwards-compatible manner:

 - The value from `.Value()` is used for each element.
 - We parse `[markup.sanitizer]` and all `[markup.sanitizer.*]` sections and add them as rules.

This means that existing configs will load one rule (not all rules). It also means people can use string identifiers (`[markup.sanitiser.KaTeX]`) if they prefer, instead of numbered ones.

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
..
analyze Migrate to go-enry new version ()
auth Add option to increase provided OAuth2 token maximum size ()
avatar Improve handling of non-square avatars ()
base Add gitea-vet ()
cache make avatar lookup occur at image request ()
charset deps: update and fix chardet import ()
context Fix release counter on API repository info ()
convert Prevent merge of outdated PRs on protected branches ()
cron Refactor repository check and sync functions ()
emoji Support unicode emojis and remove emojify.js ()
generate Add gitea-vet ()
git Support unicode emojis and remove emojify.js ()
gitgraph Move git graph from models to modules/graph ()
graceful Prevent panic during wrappedConn close at hammertime ()
highlight Add a lot of extension to language mappings for syntax highlights ()
httplib Add golangci ()
indexer Log the indexer path on failure ()
lfs Add gitea-vet ()
log modules/log: remove noop written variables ()
markup Support unicode emojis and remove emojify.js ()
metrics Prometheus endpoint ()
migrations When migrating from Gitlab map Approvals to approving Reviews ()
notification add request review from specific reviewers feature in pull request ()
options Rename scripts to build and add revive command as a new build tool command ()
password Add password requirement info on error ()
pprof Add golangci ()
private Upgrade golangci-lint to 1.24.0 ()
process Add gitea-vet ()
public Send 404 immediately for known public requests ()
queue Improve config logging when WrappedQueue times out ()
recaptcha fixed reCAPTCHA URL ()
references Accept punctuation after simple+cross repository issue references ()
repofiles Fix GetContents(): Dont't ignore Executables ()
repository Fix forked repo has no icon and language stat. ()
secret Integrate OAuth2 Provider ()
session Use gitea forked macaron ()
setting Fix sanitizer config - multiple rules ()
ssh log.Fatal on failure to listen to SSH port ()
structs Add support for migrating from Gitlab ()
sync Fix missing unlock in uniquequeue ()
task Move create/fork repository from models to modules/repository ()
templates Support unicode emojis and remove emojify.js ()
test Add Organization Wide Labels ()
timeutil Use gitea forked macaron ()
upload Fix upload file type check ()
user Add gitea-vet ()
util inform participants on UI too ()
validation [API] Get a single commit via Ref ()
webhook Add Matrix webhook ()