aboutsummaryrefslogtreecommitdiff
path: root/bytesconv.go
diff options
context:
space:
mode:
Diffstat (limited to 'bytesconv.go')
-rw-r--r--bytesconv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/bytesconv.go b/bytesconv.go
index b3cf29e..4e36d1d 100644
--- a/bytesconv.go
+++ b/bytesconv.go
@@ -35,7 +35,7 @@ func AppendHTMLEscape(dst []byte, s string) []byte {
case '\'':
sub = "'" // "'" is shorter than "'" and apos was not in HTML until HTML5.
}
- if len(sub) > 0 {
+ if sub != "" {
dst = append(dst, s[prev:i]...)
dst = append(dst, sub...)
prev = i + 1