You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules
Alexander Scheel ee7df7ba8c Markdown: Sanitizier Configuration (#9075)
* Support custom sanitization policy

Allowing the gitea administrator to configure sanitization policy allows
them to couple external renders and custom templates to support more
markup. In particular, the `pandoc` renderer allows generating KaTeX
annotations, wrapping them in `<span>` elements with class `math` and
either `inline` or `display` (depending on whether or not inline or
block mode was requested).

This iteration gives the administrator whitelisting powers; carefully
crafted regexes will thus let through only the desired attributes
necessary to support their custom markup.

Resolves: #9054

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Document new sanitization configuration

 - Adds basic documentation to app.ini.sample,
 - Adds an example to the Configuration Cheat Sheet, and
 - Adds extended information to External Renderers section.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Drop extraneous length check in newMarkupSanitizer(...)

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>

* Fix plural ELEMENT and ALLOW_ATTR in docs

These were left over from their initial names. Make them singular to
conform with the current expectations.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
5 years ago
..
auth Branch protection: Possibility to not use whitelist but allow anyone with write access (#9055) 5 years ago
avatar Improve handling of non-square avatars (#7025) 5 years ago
base Use gitea forked macaron (#7933) 5 years ago
cache Use gitea forked macaron (#7933) 5 years ago
charset Reduce test sensibility (#8393) 5 years ago
context Fix nil context user (#9099) 5 years ago
convert [Bug] [API] Add language to user api (#9215) 5 years ago
cron Update migrated repositories' issues/comments/prs poster id if user has a github external user saved (#7751) 5 years ago
generate Integrate OAuth2 Provider (#5378) 5 years ago
git Graceful: Cancel Process on monitor pages & HammerTime (#9213) 5 years ago
gitgraph Move git graph from models to modules/graph (#9027) 5 years ago
graceful Add comment to exported function WindowsServiceName (make revive) (#9241) 5 years ago
highlight Add a lot of extension to language mappings for syntax highlights (#7741) 5 years ago
httplib Add golangci (#6418) 5 years ago
indexer upgrade levelqueue to 0.1.0 (#9192) 5 years ago
lfs Add basic repository lfs management (#7199) 5 years ago
log Fix data race (#8204) 5 years ago
markup Markdown: Sanitizier Configuration (#9075) 5 years ago
metrics Prometheus endpoint (#5256) 6 years ago
migrations Add retry for migration http/https requests (#9019) 5 years ago
notification Move mirror sync actions to notification (#9022) 5 years ago
options Use gitea forked macaron (#7933) 5 years ago
password Add password requirement info on error (#9074) 5 years ago
pprof Add golangci (#6418) 5 years ago
private Allow Protected Branches to Whitelist Deploy Keys (#8483) 5 years ago
process Graceful: Cancel Process on monitor pages & HammerTime (#9213) 5 years ago
public Use gitea forked macaron (#7933) 5 years ago
recaptcha fixed reCAPTCHA URL (#9083) 5 years ago
references Alternate syntax for cross references (#9116) 5 years ago
repofiles Move UpdateIssuesCommit from models to repofiles (#9276) 5 years ago
search Global code search support (#3664) 6 years ago
secret Integrate OAuth2 Provider (#5378) 5 years ago
session Use gitea forked macaron (#7933) 5 years ago
setting Markdown: Sanitizier Configuration (#9075) 5 years ago
ssh Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964) 5 years ago
structs Add release_counter to Repo API (#9214) 5 years ago
sync Use gitea forked macaron (#7933) 5 years ago
task Fix bug when migrate from API (#8631) 5 years ago
templates Add USE_SERVICE_WORKER setting (#9110) 5 years ago
test Add Close() method to gogitRepository (#8901) 5 years ago
timeutil Use gitea forked macaron (#7933) 5 years ago
upload Fix upload file type check (#7890) 5 years ago
user Add golangci (#6418) 5 years ago
util Convert EOL to UNIX-style to render MD properly (#8925) 5 years ago
validation Implement webhook branch filter (#7791) 5 years ago
webhook Make consistent links to repository in the Slack/Mattermost notificiations (#9205) 5 years ago