This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/roller.git


The following commit(s) were added to refs/heads/master by this push:
     new a459f6f  Fixed: Variables should be declared explicitly in Custom JS 
code (ROL-2157)
     new 3e7c421  Merge pull request #53 from adityasharma7/ROL-2157
a459f6f is described below

commit a459f6f7420baa9b40e391374f2136485ad25c57
Author: Aditya Sharma <iamadityashar...@gmail.com>
AuthorDate: Thu Dec 19 17:41:24 2019 +0530

    Fixed: Variables should be declared explicitly in Custom JS code (ROL-2157)
---
 app/src/main/webapp/theme/scripts/searchhi.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/src/main/webapp/theme/scripts/searchhi.js 
b/app/src/main/webapp/theme/scripts/searchhi.js
index 8205281..e9aa08d 100644
--- a/app/src/main/webapp/theme/scripts/searchhi.js
+++ b/app/src/main/webapp/theme/scripts/searchhi.js
@@ -76,8 +76,8 @@ function highlightTerm() {
     // ensure this only executes when showing search results
     if (document.getElementById("searchAgain")) {
         var searchTerm = document.getElementById("q").value;
-        words = unescape(searchTerm.replace(/\+/g,' ')).split(/\s+/);
-        for (w=0;w<words.length;w++) {
+        var words = unescape(searchTerm.replace(/\+/g,' ')).split(/\s+/);
+        for (var w=0;w<words.length;w++) {
             highlightWord(document.getElementsByTagName("body")[0],words[w]);
         }
     }

Reply via email to