mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
fix: rss image path incorrect: data-src -> src
This commit is contained in:
1 parent
aa91997c0c
commit
4bfff2e5e9
2 files changed
+7
-1
No files matched your search
@@ -25,6 +25,7 @@ func init() {
|
||||
TplFuncMap["join"] = Join
|
||||
TplFuncMap["isnotzero"] = IsNotZero
|
||||
TplFuncMap["getavatar"] = GetAvatar
|
||||
TplFuncMap["imgtonormal"] = ImgToNormal
|
||||
}
|
||||
|
||||
// Str2html string to html
|
||||
@@ -73,3 +74,8 @@ func GetAvatar(domain string) string {
|
||||
|
||||
return avatar
|
||||
}
|
||||
|
||||
// ImgToNormal replace lazy image attr data-src to src
|
||||
func ImgToNormal(content string) string {
|
||||
return strings.ReplaceAll(content, "data-src=", "src=")
|
||||
}
|
||||
Reference in new issue
Block a user