jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1038657 - /jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp
Date Wed, 24 Nov 2010 16:01:26 GMT
Author: jukka
Date: Wed Nov 24 16:01:26 2010
New Revision: 1038657

URL: http://svn.apache.org/viewvc?rev=1038657&view=rev
Log:
JCR-2709: Missing XPath escape in query.jsp

Fix based on a patch by Douglas Jose

Modified:
    jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp

Modified: jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp?rev=1038657&r1=1038656&r2=1038657&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp (original)
+++ jackrabbit/trunk/jackrabbit-webapp/src/main/webapp/search.jsp Wed Nov 24 16:01:26 2010
@@ -69,6 +69,7 @@
             String stmt;
             if (q.startsWith("related:")) {
                 String path = q.substring("related:".length());
+                path = path.replaceAll("'", "''");
                 stmt = "//element(*, nt:file)[rep:similar(jcr:content, '" + path + "/jcr:content')]/rep:excerpt(.)
order by @jcr:score descending";
                 queryTerms = "similar to <b>" + Text.encodeIllegalXMLCharacters(path)
+ "</b>";
             } else {



Mime
View raw message