This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/modules
Giteabot 10df304b2f
Fix various ImageDiff/SVG bugs (#23312) (#23358)
Backport #23312

Replace #23310, Close #19733

And fix various UI problems, including regressions from #22959 #22950
and more.


## SVG Detection

The old regexp may mismatch non-SVG files. This PR adds new tests for
those cases.

## UI Changes

### Before


![image](https://user-images.githubusercontent.com/2114189/222967716-f6ad8721-f46a-4a3f-9eb0-a89e488d3436.png)


![image](https://user-images.githubusercontent.com/2114189/222967780-8af8981a-e69d-4304-9dc4-0235582fa4f4.png)


### After


![image](https://user-images.githubusercontent.com/2114189/222967575-c21c23d4-0200-4e09-aac3-57895e853000.png)


![image](https://user-images.githubusercontent.com/2114189/222967585-8b8da262-bc96-441a-9851-8d3845f2659d.png)


![image](https://user-images.githubusercontent.com/2114189/222967595-58d9bea5-6df4-41fa-bf8a-86704117959d.png)


![image](https://user-images.githubusercontent.com/2114189/222967608-38757c1a-b8bd-4ebf-b7a8-3b30edb7f303.png)


![image](https://user-images.githubusercontent.com/2114189/222967623-9849a339-6fae-4484-8fa5-939e2fdacbf5.png)


![image](https://user-images.githubusercontent.com/2114189/222967633-4383d7dd-62ba-47a3-8c10-86f7ca7757ae.png)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-03-07 15:38:13 +02:00
..
actions
activitypub Add Chef package registry (#22554) 2023-02-06 09:49:21 +08:00
analyze
auth Fix various bugs for "install" page (#23194) (#23286) 2023-03-05 11:59:58 +01:00
avatar
base
cache Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
charset Fix isAllowed of escapeStreamer (#22814) 2023-02-09 20:51:36 +08:00
container
context Render access log template as text instead of HTML (#23013) 2023-02-21 10:22:13 +08:00
csv Add context when rendering labels or emojis (#23281) (#23319) 2023-03-06 10:32:40 -06:00
doctor Refactor `setting.Database.UseXXX` to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
emoji
eventsource
generate
git Fix GetFilesChangedBetween if the file name may be escaped (#23272) (#23279) 2023-03-04 00:38:31 -05:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful
hcaptcha
highlight Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
hostmatcher
html
httpcache Add some comments for recent code (#22725) 2023-02-02 11:39:38 -06:00
httplib
indexer Refactor the setting to make unit test easier (#22405) 2023-02-20 00:12:01 +08:00
issue/template
json
label Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
lfs escape filename when assemble URL (#22850) 2023-02-12 09:31:14 +08:00
log Improve trace logging for pulls and processes (#22633) 2023-02-03 18:11:48 -05:00
markup Add context when rendering labels or emojis (#23281) (#23319) 2023-03-06 10:32:40 -06:00
mcaptcha
metrics include build info in Prometheus metrics (#22819) 2023-02-08 19:54:01 +02:00
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror
nosql
notification
options Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
packages Use import of OCI structs (#22765) 2023-02-06 10:07:09 +00:00
paginator
pprof
private
process Improve trace logging for pulls and processes (#22633) 2023-02-03 18:11:48 -05:00
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol
public
queue Properly flush unique queues on startup (#23154) (#23201) 2023-03-06 22:35:07 +08:00
recaptcha
references
regexplru
repository Add loading yaml label template files (#22976) (#23232) 2023-03-01 21:57:34 -05:00
secret
session
setting Refactor `setting.Database.UseXXX` to methods (#23354) (#23356) 2023-03-07 20:11:44 +08:00
sitemap
ssh
storage Add InsecureSkipVerify to Minio Client for Storage (#23166) (#23177) 2023-02-28 00:29:17 +02:00
structs Add scopes to API to create token and display them (#22989) 2023-02-20 15:28:44 -06:00
svg
sync
system
templates Add context when rendering labels or emojis (#23281) (#23319) 2023-03-06 10:32:40 -06:00
test Rename `repo.GetOwner` to `repo.LoadOwner` (#22967) 2023-02-18 20:11:03 +08:00
timeutil
translation
turnstile Add new captcha: cloudflare turnstile (#22369) 2023-02-05 15:29:03 +08:00
typesniffer Fix various ImageDiff/SVG bugs (#23312) (#23358) 2023-03-07 15:38:13 +02:00
updatechecker
upload
uri
user
util Move `IsReadmeFile*` from `modules/markup/` to `modules/util` (#22877) 2023-02-13 15:01:09 -05:00
validation Map OIDC groups to Orgs/Teams (#21441) 2023-02-08 14:44:42 +08:00
watcher
web Map OIDC groups to Orgs/Teams (#21441) 2023-02-08 14:44:42 +08:00
webhook