aboutsummaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-rw-r--r--src/html/template/css.go2
-rw-r--r--src/html/template/escape_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/html/template/css.go b/src/html/template/css.go
index 318464835f..4c27cce85a 100644
--- a/src/html/template/css.go
+++ b/src/html/template/css.go
@@ -249,7 +249,7 @@ func cssValueFilter(args ...interface{}) string {
}
}
id = bytes.ToLower(id)
- if bytes.Index(id, expressionBytes) != -1 || bytes.Index(id, mozBindingBytes) != -1 {
+ if bytes.Contains(id, expressionBytes) || bytes.Contains(id, mozBindingBytes) {
return filterFailsafe
}
return string(b)
diff --git a/src/html/template/escape_test.go b/src/html/template/escape_test.go
index 707394e3b0..023ee57d59 100644
--- a/src/html/template/escape_test.go
+++ b/src/html/template/escape_test.go
@@ -990,7 +990,7 @@ func TestErrors(t *testing.T) {
}
continue
}
- if strings.Index(got, test.err) == -1 {
+ if !strings.Contains(got, test.err) {
t.Errorf("input=%q: error\n\t%q\ndoes not contain expected string\n\t%q", test.input, got, test.err)
continue
}