mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🔒 Some XSS vulnerabilities https://github.com/siyuan-note/siyuan/issues/13171
This commit is contained in:
parent
74db798a04
commit
096fea2c8f
4 changed files with 14 additions and 14 deletions
|
|
@ -87,6 +87,16 @@ func EscapeHTML(s string) (ret string) {
|
|||
return
|
||||
}
|
||||
|
||||
func UnescapeHTML(s string) (ret string) {
|
||||
ret = s
|
||||
if "" == strings.TrimSpace(ret) {
|
||||
return
|
||||
}
|
||||
|
||||
ret = html.UnescapeString(ret)
|
||||
return
|
||||
}
|
||||
|
||||
func Reverse(s string) string {
|
||||
runes := []rune(s)
|
||||
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue