1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 03:28:20 +00:00

Improve HTML escaping helper (#12562)

The previous method did not escape single quotes which under some
circumstances can lead to XSS vulnerabilites and the fact that it
depends on jQuery is also not ideal. Replace it with a lightweight
module.
This commit is contained in:
silverwind
2020-08-22 14:36:56 +02:00
committed by GitHub
parent 03ba12aabf
commit ee5e5a5093
3 changed files with 13 additions and 10 deletions

5
package-lock.json generated
View File

@@ -4007,6 +4007,11 @@
"es6-symbol": "^3.1.1"
}
},
"escape-goat": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-3.0.0.tgz",
"integrity": "sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw=="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",