community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1782794 - /comdev/projects.apache.org/site/js/projects.js
Date Mon, 13 Feb 2017 15:36:38 GMT
Author: humbedooh
Date: Mon Feb 13 15:36:38 2017
New Revision: 1782794

URL: http://svn.apache.org/viewvc?rev=1782794&view=rev
Log:
html escape string

Modified:
    comdev/projects.apache.org/site/js/projects.js

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1782794&r1=1782793&r2=1782794&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Mon Feb 13 15:36:38 2017
@@ -1517,7 +1517,7 @@ function searchProjects(str) {
         }
     }
 
-    obj.innerHTML = "<h2>Search results for '" + str + "' (" + hitssorted.length +
"):</h2>";
+    obj.innerHTML = "<h2>Search results for '" + str.replace(/</g, "&lt;").replace(/>/g,
"&gt;") + "' (" + hitssorted.length + "):</h2>";
     hitssorted.sort(function(a,b) { return hits[b].length - hits[a].length });
     var ul = document.createElement('ul');
 



Mime
View raw message