Skip to content

Commit

Permalink
Fix copy-paste bug in the HTML escaping 🪲
Browse files Browse the repository at this point in the history
  • Loading branch information
mp4096 committed Sep 29, 2018
1 parent f158f93 commit b814436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ func EncodeRfc1342(someString string) string {
// EscapeHtmlCharacters escapes angle brackets and ampersand for HTML
func EscapeHtmlCharacters(someBytes []byte) []byte {
escaped := bytes.Replace(someBytes, []byte("&"), []byte("&"), -1)
escaped = bytes.Replace(someBytes, []byte("<"), []byte("&lt;"), -1)
escaped = bytes.Replace(escaped, []byte("<"), []byte("&lt;"), -1)
return bytes.Replace(escaped, []byte(">"), []byte("&gt;"), -1)
}

0 comments on commit b814436

Please sign in to comment.