forgejo/modules
Jonathan Tran 81467e6f35
Display SVG files as images instead of text (#14101)
* Change to display SVG files as images

* Remove unsafe styles from SVG CSP

* Add integration test to test SVG headers

* Add config setting to disable SVG rendering

* Add test for img tag when loading SVG image

* Remove the Raw view button for svg files since we don't fully support this

* Fix copyright year

* Rename and move config setting

* Add setting to cheat sheet in docs

* Fix so that comment matches cheat sheet

* Add allowing styles in CSP based on pull request feedback

* Re-enable raw button since we show SVG styles now

* Change so that SVG files are editable

* Add UI to toggle between source and rendered image for SVGs

* Change to show blame button for SVG images

* Fix to update ctx data

* Add test for DetectContentType when file is longer than sniffLen

Co-authored-by: Jonathan Tran <jon@allspice.io>
Co-authored-by: Kyle D <kdumontnu@gmail.com>
2021-01-12 22:45:19 -05:00
..
analyze
auth Add option to change username to the admin panel (#14229) 2021-01-10 14:14:02 +02:00
avatar Avatars and Repo avatars support storing in minio (#12516) 2020-10-14 21:07:51 +08:00
base Display SVG files as images instead of text (#14101) 2021-01-12 22:45:19 -05:00
cache Use native git variants by default with go-git variants as build tag (#13673) 2020-12-17 22:00:47 +08:00
charset
context Fix windows build error (#14263) 2021-01-06 09:38:00 +08:00
convert Add MirrorInterval to the API (#14163) 2021-01-02 18:47:47 -05:00
cron Added option to disable migrations (#13114) 2020-12-21 15:39:41 +01:00
doctor Refactor doctor (#12264) 2020-12-02 06:56:04 +02:00
emoji
eventsource
generate
git migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
gitgraph [Refactor] CombinedStatus and CommitStatus related functions & structs (#14026) 2020-12-18 11:33:32 +08:00
graceful Fix windows build error (#14263) 2021-01-06 09:38:00 +08:00
hcaptcha hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
highlight Use existing analyzer module for language detection for highlighting (#13522) 2020-11-13 16:13:41 -05:00
httpcache HTTP cache rework and enable caching for storage assets (#13569) 2020-11-17 17:44:52 -05:00
httplib
indexer Use native git variants by default with go-git variants as build tag (#13673) 2020-12-17 22:00:47 +08:00
lfs Some code improvements (#14266) 2021-01-06 19:23:57 +00:00
log Fix windows build error (#14263) 2021-01-06 09:38:00 +08:00
markup Render links for commit hashes followed by comma (#14224) 2021-01-03 23:11:10 +08:00
matchlist Add Allow-/Block-List for Migrate & Mirrors (#13610) 2020-11-28 19:37:58 -05:00
metrics
middlewares Fix recovery middleware to render gitea style page. (#13857) 2021-01-05 21:05:40 +08:00
migrations Add MirrorInterval to the API (#14163) 2021-01-02 18:47:47 -05:00
nosql
notification Send notifications for mentions in pulls, issues, (code-)comments (#14218) 2021-01-02 18:04:02 +01:00
options Add StatDir and replace com.StatDir (#14099) 2020-12-22 07:40:57 +08:00
password
pprof
private Fix send mail (#13312) 2020-10-26 12:42:27 -04:00
process
public When visit /favicon.ico but the static file is not exist return 404 but not continue to handle the route (#14211) 2021-01-01 17:05:45 -05:00
queue Slightly simplify the queue settings code to help reduce the risk of problems (#12976) 2020-10-15 17:40:03 -04:00
recaptcha hCaptcha Support (#12594) 2020-10-02 23:37:53 -04:00
references Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198) 2020-12-21 16:39:28 +01:00
repofiles Standardize Co-Authored-By / Reviewed-By strings (#14097) 2020-12-21 21:19:33 -05:00
repository Add MirrorInterval to the API (#14163) 2021-01-02 18:47:47 -05:00
secret Attachments: Add extension support, allow all types for releases (#12465) 2020-10-05 01:49:33 -04:00
session
setting Display SVG files as images instead of text (#14101) 2021-01-12 22:45:19 -05:00
ssh migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
storage Fix Storage mapping (#13297) 2020-10-25 17:19:06 +00:00
structs Add MirrorInterval to the API (#14163) 2021-01-02 18:47:47 -05:00
svg
sync
task Migrations: Use Process Manager to create own Context (#13792) 2020-12-02 18:36:06 +00:00
templates Fix recovery middleware to render gitea style page. (#13857) 2021-01-05 21:05:40 +08:00
test
timeutil
translation Fix recovery middleware to render gitea style page. (#13857) 2021-01-05 21:05:40 +08:00
upload Update golangci-lint to version 1.31.0 (#13102) 2020-10-11 21:27:20 +01:00
uri Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) 2020-12-27 11:34:19 +08:00
user
util migrate from com.* to alternatives (#14103) 2020-12-25 11:59:32 +02:00
validation