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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 45 additions and 42 deletions

View file

@ -6,9 +6,9 @@
//
// This documentation describes the Gitea API.
//
// Schemes: http, https
// Schemes: https, http
// BasePath: /api/v1
// Version: {{AppVer | JSEscape | Safe}}
// Version: {{AppVer | JSEscape}}
// License: MIT http://opensource.org/licenses/MIT
//
// Consumes: