Author: scottbw
Date: Wed Oct  5 11:12:16 2011
New Revision: 1179162

URL: http://svn.apache.org/viewvc?rev=1179162&view=rev
Log:
Updated HTMLCleaner to v2.2 as an Ivy dependency and removed the local jar; see 
WOOKIE-248

Removed:
    incubator/wookie/trunk/ant/lib/htmlcleaner-2.1.0.jar
Modified:
    incubator/wookie/trunk/.classpath
    incubator/wookie/trunk/ivy.xml
    incubator/wookie/trunk/src/org/apache/wookie/util/html/HtmlSerializer.java

Modified: incubator/wookie/trunk/.classpath
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/.classpath?rev=1179162&r1=1179161&r2=1179162&view=diff
==============================================================================
--- incubator/wookie/trunk/.classpath (original)
+++ incubator/wookie/trunk/.classpath Wed Oct  5 11:12:16 2011
@@ -6,7 +6,6 @@
        <classpathentry kind="src" output="parser/java/bin" 
path="parser/java/src-test"/>
        <classpathentry kind="src" path="connector/java/src"/>
        <classpathentry kind="src" path="connector/java/src-test"/>
-       <classpathentry exported="true" kind="lib" 
path="ant/lib/htmlcleaner-2.1.0.jar"/>
        <classpathentry exported="true" kind="lib" 
path="ant/lib/dwr-2.0.5.jar"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
        <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

Modified: incubator/wookie/trunk/ivy.xml
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/ivy.xml?rev=1179162&r1=1179161&r2=1179162&view=diff
==============================================================================
--- incubator/wookie/trunk/ivy.xml (original)
+++ incubator/wookie/trunk/ivy.xml Wed Oct  5 11:12:16 2011
@@ -60,7 +60,7 @@
         </dependency>
         <dependency org="dom4j" name="dom4j" rev="1.6.1" 
conf="deploy->default">
         </dependency>
-        <dependency org="htmlcleaner" name="htmlcleaner" rev="2.1.0" 
conf="deploy->default">
+        <dependency org="net.sourceforge.htmlcleaner" name="htmlcleaner" 
rev="2.2" conf="deploy->default">
         </dependency>
         <dependency org="org.directwebremoting" name="dwr" rev="2.0.5" 
conf="deploy->default">
                </dependency>

Modified: 
incubator/wookie/trunk/src/org/apache/wookie/util/html/HtmlSerializer.java
URL: 
http://svn.apache.org/viewvc/incubator/wookie/trunk/src/org/apache/wookie/util/html/HtmlSerializer.java?rev=1179162&r1=1179161&r2=1179162&view=diff
==============================================================================
--- incubator/wookie/trunk/src/org/apache/wookie/util/html/HtmlSerializer.java 
(original)
+++ incubator/wookie/trunk/src/org/apache/wookie/util/html/HtmlSerializer.java 
Wed Oct  5 11:12:16 2011
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.htmlcleaner.BaseToken;
 import org.htmlcleaner.CleanerProperties;
-import org.htmlcleaner.ContentToken;
+import org.htmlcleaner.ContentNode;
 import org.htmlcleaner.TagNode;
 import org.htmlcleaner.XmlSerializer;
 
@@ -116,8 +116,8 @@ public class HtmlSerializer extends XmlS
             while ( childrenIt.hasNext() ) {
                 Object item = childrenIt.next();
                 if (item != null) {
-                    if ( item instanceof ContentToken ) {
-                        String content = ((ContentToken) item).getContent();
+                    if ( item instanceof ContentNode ) {
+                        String content = ((ContentNode) 
item).getContent().toString();
                         writer.write( dontEscape(tagNode) ? 
content.replaceAll("]]>", "]]&gt;") : escapeXml(content) );
                     } else {
                         ((BaseToken)item).serialize(this, writer);


Reply via email to