roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1515915 - in /roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model: SearchResultsFeedModel.java SearchResultsModel.java
Date Tue, 20 Aug 2013 18:41:38 GMT
Author: snoopdave
Date: Tue Aug 20 18:41:38 2013
New Revision: 1515915

URL: http://svn.apache.org/r1515915
Log:
apply proper escaping

Modified:
    roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
    roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java

Modified: roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java?rev=1515915&r1=1515914&r2=1515915&view=diff
==============================================================================
--- roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
(original)
+++ roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsFeedModel.java
Tue Aug 20 18:41:38 2013
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
+import org.apache.commons.lang.StringEscapeUtils;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
@@ -50,6 +51,7 @@ import org.apache.roller.weblogger.ui.re
 import org.apache.roller.weblogger.ui.rendering.pagers.SearchResultsFeedPager;
 import org.apache.roller.weblogger.ui.rendering.util.WeblogFeedRequest;
 import org.apache.roller.weblogger.ui.rendering.util.WeblogRequest;
+import org.apache.roller.weblogger.util.Utilities;
 
 
 /**
@@ -230,7 +232,9 @@ public class SearchResultsFeedModel impl
     }
     
     public String getTerm() {
-        return (feedRequest.getTerm() == null) ? "" : feedRequest.getTerm();
+		String query =feedRequest.getTerm() ;
+		return (query == null) 
+			? "" : StringEscapeUtils.escapeXml(Utilities.escapeHTML(query));
     }
 
     public int getHits() {

Modified: roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java?rev=1515915&r1=1515914&r2=1515915&view=diff
==============================================================================
--- roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
(original)
+++ roller/branches/roller_5.0/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/model/SearchResultsModel.java
Tue Aug 20 18:41:38 2013
@@ -234,8 +234,9 @@ public class SearchResultsModel extends 
     
     
     public String getTerm() {
-        String query = searchRequest.getQuery();
-        return (query == null) ? "" : StringEscapeUtils.escapeXml(Utilities.escapeHTML(query));
+		String query = searchRequest.getQuery();
+		return (query == null) 
+			? "" : StringEscapeUtils.escapeXml(Utilities.escapeHTML(query));
     }
 
     public String getRawTerm() {



Mime
View raw message