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/docs/content/doc/advanced
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
..
api-usage.en-us.md DOCS: add mention of swagger api reference (#8452) 5 years ago
api-usage.zh-cn.md Adapt documentation to renamed ENABLE_SWAGGER option (#5811) 6 years ago
ci-cd.en-us.md Add buildbot CI (#8378) 5 years ago
config-cheat-sheet.en-us.md Markdown: Sanitizier Configuration (#9075) 5 years ago
config-cheat-sheet.zh-cn.md Only show part of members on orgnization dashboard and add paging for orgnization members page (#9092) 5 years ago
customizing-gitea.en-us.md [Feature] Custom Reactions (#8886) 5 years ago
customizing-gitea.zh-cn.md Fix translation errors in doc advanced part (zh-cn) (#5112) 6 years ago
external-renderers.en-us.md Markdown: Sanitizier Configuration (#9075) 5 years ago
hacking-on-gitea.en-us.md Add Node.js build dep, remove built js/css files (#9114) 5 years ago
hacking-on-gitea.zh-cn.md ZH-CN translation of Advanced part (#5090) 6 years ago
logging-documentation.en-us.md Move serv hook functionality & drop GitLogger (#6993) 5 years ago
mail-templates-us.md Add review comments to mail notifications (#8996) 5 years ago
make.en-us.md General documentation cleanup (#3317) 7 years ago
make.fr-fr.md General documentation cleanup (#3317) 7 years ago
make.zh-cn.md ZH-CN translation of Advanced part (#5090) 6 years ago
migrations.en-us.md Add Close() method to gogitRepository (#8901) 5 years ago
oauth2-provider.md Add oauth2 documentation (#6604) 5 years ago
repo-indexer.en-us.md Restrict repository indexing by glob match (#7767) 5 years ago
signing.en-us.md Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 5 years ago
specific-variables.en-us.md Copyedit docs (#6275) 5 years ago
specific-variables.zh-cn.md ZH-CN translation of Advanced part (#5090) 6 years ago
third-party-tools.en-us.md Update third-party-tools.en-us.md (#8148) 5 years ago
third-party-tools.zh-cn.md Create third-party-tools.zh-cn.md (#6303) 5 years ago