You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ad...@apache.org on 2019/12/19 12:15:35 UTC

[roller] branch roller-6.0.x updated: Fixed: Variables should be declared explicitly in Custom JS code (ROL-2157)

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

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


The following commit(s) were added to refs/heads/roller-6.0.x by this push:
     new d69b27b  Fixed: Variables should be declared explicitly in Custom JS code (ROL-2157)
     new 7d11070  Merge pull request #54 from adityasharma7/ROL-2157-6.0
d69b27b is described below

commit d69b27b8f3dae837c91f0675b013b36cde8cf603
Author: Aditya Sharma <ia...@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]);
         }
     }