forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r355544 - /forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java
Date Fri, 09 Dec 2005 17:10:57 GMT
Author: rgardler
Date: Fri Dec  9 09:10:48 2005
New Revision: 355544

URL: http://svn.apache.org/viewcvs?rev=355544&view=rev
Log:
if the location is an http: URL then URLEncode the result before returning it (fixes FOR-736)

Modified:
    forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java

Modified: forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java?rev=355544&r1=355543&r2=355544&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java (original)
+++ forrest/trunk/main/java/org/apache/forrest/locationmap/lm/LocationMap.java Fri Dec  9
09:10:48 2005
@@ -16,6 +16,7 @@
  */
 package org.apache.forrest.locationmap.lm;
 
+import java.net.URLEncoder;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -287,7 +288,11 @@
             getLogger().error(msg);;
             throw new Exception(msg);
         }
-
+        
+        if (location.startsWith("http:")) {
+        	location = URLEncoder.encode(location, "UTF-8");
+        }
+        
         return location;
     }
     



Mime
View raw message