mirror of
https://gitlab.com/commento/commento.git
synced 2026-11-01 01:16:21 -05:00
commenter_update.go: parse empty links as undefined
This commit is contained in:
1 parent
ea3419e8b4
commit
b7c214e910
1 file changed
+3
-1
@@ -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