Skip to content

Commit b814436

Browse files
committed
Fix copy-paste bug in the HTML escaping 🪲
1 parent f158f93 commit b814436

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎encoding.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ func EncodeRfc1342(someString string) string {
3737
// EscapeHtmlCharacters escapes angle brackets and ampersand for HTML
3838
func EscapeHtmlCharacters(someBytes []byte) []byte {
3939
escaped := bytes.Replace(someBytes, []byte("&"), []byte("&"), -1)
40-
escaped = bytes.Replace(someBytes, []byte("<"), []byte("&lt;"), -1)
40+
escaped = bytes.Replace(escaped, []byte("<"), []byte("&lt;"), -1)
4141
return bytes.Replace(escaped, []byte(">"), []byte("&gt;"), -1)
4242
}

0 commit comments

Comments
 (0)
⌂ 换网址