From: <bra...@us...> - 2008-09-04 21:35:59
|
Revision: 2590 http://archive-access.svn.sourceforge.net/archive-access/?rev=2590&view=rev Author: bradtofel Date: 2008-09-04 21:36:09 +0000 (Thu, 04 Sep 2008) Log Message: ----------- BUGFIX(ACC-31): now escapes URLs as they are resolved in UrlOperations. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java 2008-09-02 23:26:08 UTC (rev 2589) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java 2008-09-04 21:36:09 UTC (rev 2590) @@ -83,7 +83,14 @@ public static String resolveUrl(String baseUrl, String url) { // TODO: this only works for http:// if(url.startsWith("http://")) { - return url; + try { + return UURIFactory.getInstance(url).getEscapedURI(); + } catch (URIException e) { + e.printStackTrace(); + // can't let a space exist... send back close to whatever came + // in... + return url.replace(" ", "%20"); + } } UURI absBaseURI; UURI resolvedURI = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |