cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1521512 - /cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
Date Tue, 10 Sep 2013 14:37:42 GMT
Author: dkulp
Date: Tue Sep 10 14:37:42 2013
New Revision: 1521512

URL: http://svn.apache.org/r1521512
Log:
[CXF-5264] Fix links to images with spaces in names
Patch from Lukasz Lenart applied

Modified:
    cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java

Modified: cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
URL: http://svn.apache.org/viewvc/cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java?rev=1521512&r1=1521511&r2=1521512&view=diff
==============================================================================
--- cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java (original)
+++ cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java Tue Sep 10 14:37:42
2013
@@ -233,7 +233,7 @@ public class ConfluenceCleanupWriter ext
                     String dirName = page.createFileName();
                     dirName = dirName.substring(0, dirName.lastIndexOf(".")) + ".data";
 
-                    newAtts.addMapping("src", dirName + href);
+                    newAtts.addMapping("src", dirName + href.replaceAll("\\+", "-"));
                 } else if (cls.contains("userLogo")) {
                     String name = href;
                     try {
@@ -247,7 +247,7 @@ public class ConfluenceCleanupWriter ext
 
                     newAtts.addMapping("src", dirName + name);                    
                 } else {
-                    newAtts.addMapping("src", SiteExporter.HOST + href);
+                    newAtts.addMapping("src", SiteExporter.HOST + href.replaceAll("\\+",
"-"));
                 }
             } else if (href != null && href.startsWith("/confluence/download/thumbnails"))
{
                 String name = href;



Mime
View raw message