Skip to content

Commit c6be204

Browse files
committed
TG HTML - do not escape &
1 parent 2503a72 commit c6be204

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

richtext.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ func (hrt HTMLRichText) Fixed(s string) string {
2222
return "<code>" + hrt.EncodeEntities(s) + "</code>"
2323
}
2424

25-
// EncodeEntities encodes '<', '>' and '&'
25+
// EncodeEntities encodes '<', '>'
2626
func (hrt HTMLRichText) EncodeEntities(s string) string {
27-
repalcer := strings.NewReplacer("<", "&lt;", ">", "&gt;", "&", "&amp;")
27+
repalcer := strings.NewReplacer("<", "&lt;", ">", "&gt;")
2828
return repalcer.Replace(s)
2929
}
3030

0 commit comments

Comments
 (0)