summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/notification.go b/models/notification.go
index 48249ae84c..1e18073618 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -6,6 +6,7 @@ package models
import (
"fmt"
+ "net/url"
"strconv"
"code.gitea.io/gitea/models/db"
@@ -475,7 +476,7 @@ func (n *Notification) HTMLURL() string {
}
return n.Issue.HTMLURL()
case NotificationSourceCommit:
- return n.Repository.HTMLURL() + "/commit/" + n.CommitID
+ return n.Repository.HTMLURL() + "/commit/" + url.PathEscape(n.CommitID)
case NotificationSourceRepository:
return n.Repository.HTMLURL()
}