From dfb2a894744fddfc7a93e3045f8296fb8e22add4 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Tue, 20 Feb 2024 06:20:13 +0000 Subject: [PATCH] html/template: replace bytes.Compare call with bytes.Equal Change-Id: I1bd3fdf0ceb9a83dbcc07f55b81489eb2c82c9ba GitHub-Last-Rev: 05d49d7fb921e59529f7105a93b4b7fba51ab525 GitHub-Pull-Request: golang/go#65418 Reviewed-on: https://go-review.googlesource.com/c/go/+/560115 LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Carlos Amedee Reviewed-by: Ian Lance Taylor --- src/html/template/transition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/template/transition.go b/src/html/template/transition.go index d5a05f66da4..b897bea5421 100644 --- a/src/html/template/transition.go +++ b/src/html/template/transition.go @@ -414,7 +414,7 @@ func tJSDelimited(c context, s []byte) (context, int) { // If " 0 && i+7 <= len(s) && bytes.Compare(bytes.ToLower(s[i-1:i+7]), []byte(" 0 && i+7 <= len(s) && bytes.Equal(bytes.ToLower(s[i-1 : i+7]), []byte("