Improved URL sanitizer

This commit is contained in:
2024-04-01 19:34:02 +02:00
parent abb1b0c3fc
commit 133d01bd11
2 changed files with 6 additions and 2 deletions

View File

@ -171,6 +171,8 @@ func (r *renderer) writeText(markdown string) {
}
func sanitizeURL(linkURL string) string {
linkURL = strings.TrimSpace(linkURL)
if strings.HasPrefix(strings.ToLower(linkURL), "javascript:") {
return ""
}