aboutsummaryrefslogtreecommitdiff
path: root/internal/markup
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2021-05-19 13:38:13 +0800
committerGitHub <noreply@github.com>2021-05-19 13:38:13 +0800
commit1a1a01a8423a58c2c9f4906364631b160ec593eb (patch)
tree76da60be7bd2e332b91171d0b1c342928284e846 /internal/markup
parentc4cf659e324379dba29c78d6e838dfebe6b59e2f (diff)
ci: use new lint action and add custom config (#6562)
Diffstat (limited to 'internal/markup')
-rw-r--r--internal/markup/markup.go2
-rw-r--r--internal/markup/sanitizer.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/markup/markup.go b/internal/markup/markup.go
index ad9d7fa1..788708e7 100644
--- a/internal/markup/markup.go
+++ b/internal/markup/markup.go
@@ -216,7 +216,7 @@ func wrapImgWithLink(urlPrefix string, buf *bytes.Buffer, token html.Token) {
buf.WriteString(`">`)
if needPrepend {
- src = strings.Replace(urlPrefix+string(src), " ", "%20", -1)
+ src = strings.Replace(urlPrefix+src, " ", "%20", -1)
buf.WriteString(`<img src="`)
buf.WriteString(src)
buf.WriteString(`"`)
diff --git a/internal/markup/sanitizer.go b/internal/markup/sanitizer.go
index 4a8f6c28..2bd7f2da 100644
--- a/internal/markup/sanitizer.go
+++ b/internal/markup/sanitizer.go
@@ -9,8 +9,8 @@ import (
"github.com/microcosm-cc/bluemonday"
- "gogs.io/gogs/internal/lazyregexp"
"gogs.io/gogs/internal/conf"
+ "gogs.io/gogs/internal/lazyregexp"
)
// Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow