1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Refactor more code in templates (#29236)

Follow #29165. 

* Introduce JSONTemplate to help to render JSON templates
* Introduce JSEscapeSafe for templates. Now only use `{{ ... |
JSEscape}}` instead of `{{ ... | JSEscape | Safe}}`
* Simplify "UserLocationMapURL" useage
This commit is contained in:
wxiaoguang
2024-02-18 17:52:02 +08:00
committed by GitHub
parent a784ed3d6c
commit 31bb9f3247
11 changed files with 45 additions and 42 deletions

View File

@@ -8,8 +8,8 @@
"text/html"
],
"schemes": [
"http",
"https"
"https",
"http"
],
"swagger": "2.0",
"info": {
@@ -19,9 +19,9 @@
"name": "MIT",
"url": "http://opensource.org/licenses/MIT"
},
"version": "{{AppVer | JSEscape | Safe}}"
"version": "{{AppVer | JSEscape}}"
},
"basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1",
"basePath": "{{AppSubUrl | JSEscape}}/api/v1",
"paths": {
"/activitypub/user-id/{user-id}": {
"get": {