diff options
author | silverwind <me@silverwind.io> | 2020-08-24 03:44:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 21:44:53 -0400 |
commit | ee047312a1a3238a8504200f7ded8536ebc838e3 (patch) | |
tree | a4e79586f0468725bcf66a083e44c84f9a39ee5b /modules/markup/html.go | |
parent | 26bf4c51fb900b8a31cfb6d17095515c118a68a1 (diff) | |
download | gitea-ee047312a1a3238a8504200f7ded8536ebc838e3.tar.gz gitea-ee047312a1a3238a8504200f7ded8536ebc838e3.zip |
Fix emoji replacements, make emoji images consistent (#12567)
- Fix emoji not being replaced in issue title change text
- Make the image attributes consistent, add alt, remove align
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/markup/html.go')
-rw-r--r-- | modules/markup/html.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/markup/html.go b/modules/markup/html.go index 41248654d8..bef6269a69 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -481,6 +481,7 @@ func createCustomEmoji(alias, class string) *html.Node { Attr: []html.Attribute{}, } if class != "" { + img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)}) img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)}) } |