cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1367730 - /cxf/web/src/main/java/org/apache/cxf/cwiki/ConfluenceCleanupWriter.java
Date Tue, 31 Jul 2012 19:56:25 GMT
Author: dkulp
Date: Tue Jul 31 19:56:24 2012
New Revision: 1367730

URL: http://svn.apache.org/viewvc?rev=1367730&view=rev
Log:
Fix some more URL's

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=1367730&r1=1367729&r2=1367730&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 Jul 31 19:56:24
2012
@@ -52,6 +52,7 @@ public class ConfluenceCleanupWriter ext
         this.divCls = divCls;
     }
 
+    //CHECKSTYLE:OFF
     public void startElement(String uri, String localName, String qName, final Attributes
atts)
         throws SAXException {
         AttributesWrapper newAtts = new AttributesWrapper(atts);
@@ -84,11 +85,13 @@ public class ConfluenceCleanupWriter ext
                             System.out.println("Could not find page for " + href 
                                                + " linked from " + page.getTitle());
                         }
-                        newAtts.addMapping("href", SiteExporter.ROOT + href);
+                        newAtts.addMapping("href", SiteExporter.ROOT + href.substring(11));
                     }
                 } catch (Exception e) {
                     throw new SAXException(e);
                 }
+            } else if (href != null && href.startsWith("/confluence/plugins/")) {
+                newAtts.addMapping("href", SiteExporter.ROOT + href.substring(11));
             } else if (href != null && href.contains("/confluence/pages/viewpage.action"))
{
                 int idx = href.indexOf("pageId=");
                 String id = href.substring(idx + 7);
@@ -183,9 +186,18 @@ public class ConfluenceCleanupWriter ext
                     newAtts.addMapping("id", divId);
                 } 
             }
+        } else if ("input".equals(localName.toLowerCase())
+            || "input".equals(qName.toLowerCase())) {
+            String value = atts.getValue("value");
+            if (value != null && value.startsWith("/confluence/")) {
+                newAtts.addMapping("value", SiteExporter.ROOT + value.substring(11));
+            }
         }
         super.startElement(uri, localName, qName, newAtts);
     }
+    
+    
+    
     public void endElement(String uri, String localName, String qName) throws SAXException
{
         if ("tr".equals(localName.toLowerCase())
             || "tr".equals(qName.toLowerCase())) {



Mime
View raw message