mirror of
https://gitlab.com/commento/commento.git
synced 2026-06-17 09:55:27 -04:00
commenter_update.go: parse empty links as undefined
This commit is contained in:
@@ -12,7 +12,9 @@ func commenterUpdate(commenterHex string, email string, name string, link string
|
||||
// See utils_sanitise.go's documentation on isHttpsUrl. This is not a URL
|
||||
// validator, just an XSS preventor.
|
||||
// TODO: reject URLs instead of malforming them.
|
||||
if link != "undefined" && !isHttpsUrl(link) {
|
||||
if link == "" {
|
||||
link = "undefined"
|
||||
} else if link != "undefined" && !isHttpsUrl(link) {
|
||||
link = "https://" + link
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user