From add1aac04e65808e1f3ea9969c10e4494fd39d93 Mon Sep 17 00:00:00 2001 From: Chris Broadfoot Date: Wed, 18 Jan 2017 12:06:52 -0800 Subject: [PATCH] static: don't use the jQuery func for looking up based on hash $.find is safer. Change-Id: I51893b64ce804ac5a70f780a1255af2c91413110 Reviewed-on: https://go-review.googlesource.com/35430 Reviewed-by: Brad Fitzpatrick --- godoc/static/godocs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/godoc/static/godocs.js b/godoc/static/godocs.js index 3ce27ea6..23a580e5 100644 --- a/godoc/static/godocs.js +++ b/godoc/static/godocs.js @@ -247,7 +247,7 @@ function fixFocus() { function toggleHash() { // Open all of the toggles for a particular hash. var els = $(document.getElementById(window.location.hash.substring(1)), - $("a[name='" + window.location.hash.substring(1) + "']")); + $.find("a[name='" + window.location.hash.substring(1) + "']")); while (els.length) { for (var i = 0; i < els.length; i++) { var el = $(els[i]);