mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-05-08 03:39:15 -05:00
🔒 Some XSS vulnerabilities https://github.com/siyuan-note/siyuan/issues/13171
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user