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/setting
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
..
cache.go Use gitea forked macaron (#7933) 5 years ago
cors.go Use gitea forked macaron (#7933) 5 years ago
cron.go Update migrated repositories' issues/comments/prs poster id if user has a github external user saved (#7751) 5 years ago
database.go Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params (#8528) 5 years ago
database_sqlite.go Move database settings from models to setting (#7806) 5 years ago
database_test.go Move database settings from models to setting (#7806) 5 years ago
git.go Support git.PATH entry in app.ini (#6772) 5 years ago
indexer.go Restore Graceful Restarting & Socket Activation (#7274) 5 years ago
indexer_test.go Restrict repository indexing by glob match (#7767) 5 years ago
log.go Fix #9151 - smtp logger configuration sendTos should be an array (#9154) 5 years ago
mailer.go Use gitea forked macaron (#7933) 5 years ago
markup.go Markdown: Sanitizier Configuration (#9075) 5 years ago
migrations.go Add retry for migration http/https requests (#9019) 5 years ago
repository.go Configurable close and reopen keywords for PRs (#8120) 5 years ago
service.go Auto-subscribe user to repository when they commit/tag to it (#7657) 5 years ago
session.go Use gitea forked macaron (#7933) 5 years ago
setting.go Only show part of members on orgnization dashboard and add paging for orgnization members page (#9092) 5 years ago
task.go Move migrating repository from frontend to backend (#6200) 5 years ago
webhook.go Webhook support custom proxy (#8760) 5 years ago