diff options
author | zeripath <art27@cantab.net> | 2021-03-12 04:43:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-11 23:43:04 -0500 |
commit | 91ee3be58868eca4cf678932535dd721d591e06e (patch) | |
tree | 9720f69e69d633354d80d432112256fd01385ff5 /templates | |
parent | df76d9f7ad0bf2f54e3d09d3238d77049226d693 (diff) | |
download | gitea-91ee3be58868eca4cf678932535dd721d591e06e.tar.gz gitea-91ee3be58868eca4cf678932535dd721d591e06e.zip |
Prevent incorrect HTML escaping in swagger.json (#14957)
* Prevent incorrect HTML escaping in swagger.json
Fix #14706
Signed-off-by: Andrew Thornton <art27@cantab.net>
* oops add it to the helper
Signed-off-by: Andrew Thornton <art27@cantab.net>
* try again
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 930af907ea..d44583b816 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -19,9 +19,9 @@ "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, - "version": "{{AppVer}}" + "version": "{{AppVer | JSEscape | Safe}}" }, - "basePath": "{{AppSubUrl}}/api/v1", + "basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1", "paths": { "/admin/cron": { "get": { |