Upgrade htmlcleaner to 2.2

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2047 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2012-10-08 21:28:33 +00:00
parent a3e17afb97
commit c3c26b8657
13 changed files with 15 additions and 15 deletions

View File

@ -92,7 +92,7 @@ Section "MainSection" SEC01
File "dist\lib\commons-collections-3.1.jar" File "dist\lib\commons-collections-3.1.jar"
File "dist\lib\commons-httpclient-3.1.jar" File "dist\lib\commons-httpclient-3.1.jar"
File "dist\lib\commons-logging-1.0.4.jar" File "dist\lib\commons-logging-1.0.4.jar"
File "dist\lib\htmlcleaner-2.1.jar" File "dist\lib\htmlcleaner-2.2.jar"
File "dist\lib\jackrabbit-webdav-1.4.jar" File "dist\lib\jackrabbit-webdav-1.4.jar"
File "dist\lib\jcharset-1.3.jar" File "dist\lib\jcharset-1.3.jar"
File "dist\lib\jcifs-1.3.14.jar" File "dist\lib\jcifs-1.3.14.jar"
@ -167,7 +167,7 @@ no_quest:
Delete "$INSTDIR\lib\commons-collections-3.1.jar" Delete "$INSTDIR\lib\commons-collections-3.1.jar"
Delete "$INSTDIR\lib\commons-httpclient-3.1.jar" Delete "$INSTDIR\lib\commons-httpclient-3.1.jar"
Delete "$INSTDIR\lib\commons-logging-1.0.4.jar" Delete "$INSTDIR\lib\commons-logging-1.0.4.jar"
Delete "$INSTDIR\lib\htmlcleaner-2.1.jar" Delete "$INSTDIR\lib\htmlcleaner-2.2.jar"
Delete "$INSTDIR\lib\jackrabbit-webdav-1.4.jar" Delete "$INSTDIR\lib\jackrabbit-webdav-1.4.jar"
Delete "$INSTDIR\lib\jcharset-1.3.jar" Delete "$INSTDIR\lib\jcharset-1.3.jar"
Delete "$INSTDIR\lib\jcifs-1.3.14.jar" Delete "$INSTDIR\lib\jcifs-1.3.14.jar"

View File

@ -13,7 +13,7 @@
<classPath>dist/lib/commons-collections-3.1.jar</classPath> <classPath>dist/lib/commons-collections-3.1.jar</classPath>
<classPath>dist/lib/commons-httpclient-3.1.jar</classPath> <classPath>dist/lib/commons-httpclient-3.1.jar</classPath>
<classPath>dist/lib/commons-logging-1.0.4.jar</classPath> <classPath>dist/lib/commons-logging-1.0.4.jar</classPath>
<classPath>dist/lib/htmlcleaner-2.1.jar</classPath> <classPath>dist/lib/htmlcleaner-2.2.jar</classPath>
<classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath> <classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath>
<classPath>dist/lib/jcharset-1.3.jar</classPath> <classPath>dist/lib/jcharset-1.3.jar</classPath>
<classPath>dist/lib/jcifs-1.3.14.jar</classPath> <classPath>dist/lib/jcifs-1.3.14.jar</classPath>

View File

@ -13,7 +13,7 @@
<classPath>dist\lib\commons-collections-3.1.jar</classPath> <classPath>dist\lib\commons-collections-3.1.jar</classPath>
<classPath>dist\lib\commons-httpclient-3.1.jar</classPath> <classPath>dist\lib\commons-httpclient-3.1.jar</classPath>
<classPath>dist\lib\commons-logging-1.0.4.jar</classPath> <classPath>dist\lib\commons-logging-1.0.4.jar</classPath>
<classPath>dist\lib\htmlcleaner-2.1.jar</classPath> <classPath>dist\lib\htmlcleaner-2.2.jar</classPath>
<classPath>dist\lib\jackrabbit-webdav-1.4.jar</classPath> <classPath>dist\lib\jackrabbit-webdav-1.4.jar</classPath>
<classPath>dist\lib\jcharset-1.3.jar</classPath> <classPath>dist\lib\jcharset-1.3.jar</classPath>
<classPath>dist\lib\jcifs-1.3.14.jar</classPath> <classPath>dist\lib\jcifs-1.3.14.jar</classPath>

View File

@ -13,7 +13,7 @@
<classPath>dist/lib/commons-collections-3.1.jar</classPath> <classPath>dist/lib/commons-collections-3.1.jar</classPath>
<classPath>dist/lib/commons-httpclient-3.1.jar</classPath> <classPath>dist/lib/commons-httpclient-3.1.jar</classPath>
<classPath>dist/lib/commons-logging-1.0.4.jar</classPath> <classPath>dist/lib/commons-logging-1.0.4.jar</classPath>
<classPath>dist/lib/htmlcleaner-2.1.jar</classPath> <classPath>dist/lib/htmlcleaner-2.2.jar</classPath>
<classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath> <classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath>
<classPath>dist/lib/jcharset-1.3.jar</classPath> <classPath>dist/lib/jcharset-1.3.jar</classPath>
<classPath>dist/lib/jcifs-1.3.14.jar</classPath> <classPath>dist/lib/jcifs-1.3.14.jar</classPath>

View File

@ -13,7 +13,7 @@
<classPath>dist/lib/commons-collections-3.1.jar</classPath> <classPath>dist/lib/commons-collections-3.1.jar</classPath>
<classPath>dist/lib/commons-httpclient-3.1.jar</classPath> <classPath>dist/lib/commons-httpclient-3.1.jar</classPath>
<classPath>dist/lib/commons-logging-1.0.4.jar</classPath> <classPath>dist/lib/commons-logging-1.0.4.jar</classPath>
<classPath>dist/lib/htmlcleaner-2.1.jar</classPath> <classPath>dist/lib/htmlcleaner-2.2.jar</classPath>
<classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath> <classPath>dist/lib/jackrabbit-webdav-1.4.jar</classPath>
<classPath>dist/lib/jcharset-1.3.jar</classPath> <classPath>dist/lib/jcharset-1.3.jar</classPath>
<classPath>dist/lib/jcifs-1.3.14.jar</classPath> <classPath>dist/lib/jcifs-1.3.14.jar</classPath>

Binary file not shown.

BIN
lib/htmlcleaner-2.2.jar Normal file

Binary file not shown.

View File

@ -244,7 +244,7 @@
<dependency> <dependency>
<groupId>net.sourceforge.htmlcleaner</groupId> <groupId>net.sourceforge.htmlcleaner</groupId>
<artifactId>htmlcleaner</artifactId> <artifactId>htmlcleaner</artifactId>
<version>2.1</version> <version>2.2</version>
</dependency> </dependency>
<!-- included in Java 1.6, needed with Java 1.5 --> <!-- included in Java 1.6, needed with Java 1.5 -->
<dependency> <dependency>

View File

@ -33,8 +33,8 @@ import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpClientParams; import org.apache.commons.httpclient.params.HttpClientParams;
import org.apache.commons.httpclient.util.URIUtil; import org.apache.commons.httpclient.util.URIUtil;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.htmlcleaner.CommentToken; import org.htmlcleaner.CommentNode;
import org.htmlcleaner.ContentToken; import org.htmlcleaner.ContentNode;
import org.htmlcleaner.HtmlCleaner; import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.TagNode; import org.htmlcleaner.TagNode;
@ -475,8 +475,8 @@ public abstract class ExchangeSession {
for (Object script : scriptList) { for (Object script : scriptList) {
List contents = ((TagNode) script).getChildren(); List contents = ((TagNode) script).getChildren();
for (Object content : contents) { for (Object content : contents) {
if (content instanceof CommentToken) { if (content instanceof CommentNode) {
String scriptValue = ((CommentToken) content).getCommentedContent(); String scriptValue = ((CommentNode) content).getCommentedContent();
String sUrl = StringUtil.getToken(scriptValue, "var a_sUrl = \"", "\""); String sUrl = StringUtil.getToken(scriptValue, "var a_sUrl = \"", "\"");
String sLgn = StringUtil.getToken(scriptValue, "var a_sLgnQS = \"", "\""); String sLgn = StringUtil.getToken(scriptValue, "var a_sLgnQS = \"", "\"");
if (sLgn == null) { if (sLgn == null) {
@ -489,9 +489,9 @@ public abstract class ExchangeSession {
logonMethod = buildLogonMethod(httpClient, newInitMethod); logonMethod = buildLogonMethod(httpClient, newInitMethod);
} }
} else if (content instanceof ContentToken) { } else if (content instanceof ContentNode) {
// Microsoft Forefront Unified Access Gateway redirect // Microsoft Forefront Unified Access Gateway redirect
String scriptValue = ((ContentToken) content).getContent(); String scriptValue = ((ContentNode) content).getContent().toString();
String location = StringUtil.getToken(scriptValue, "window.location.replace(\"", "\""); String location = StringUtil.getToken(scriptValue, "window.location.replace(\"", "\"");
if (location != null) { if (location != null) {
LOGGER.debug("Post logon redirect to: " + location); LOGGER.debug("Post logon redirect to: " + location);

Binary file not shown.

View File

@ -5,7 +5,7 @@ classpath.3=lib/commons-codec-1.3.jar
classpath.4=lib/commons-collections-3.1.jar classpath.4=lib/commons-collections-3.1.jar
classpath.5=lib/commons-httpclient-3.1.jar classpath.5=lib/commons-httpclient-3.1.jar
classpath.6=lib/commons-logging-1.0.4.jar classpath.6=lib/commons-logging-1.0.4.jar
classpath.7=lib/htmlcleaner-2.1.jar classpath.7=lib/htmlcleaner-2.2.jar
classpath.8=lib/jackrabbit-webdav-1.4.jar classpath.8=lib/jackrabbit-webdav-1.4.jar
classpath.9=lib/jcharset-1.3.jar classpath.9=lib/jcharset-1.3.jar
classpath.10=lib/jcifs-1.3.14.jar classpath.10=lib/jcifs-1.3.14.jar

Binary file not shown.

View File

@ -5,7 +5,7 @@ classpath.3=lib/commons-codec-1.3.jar
classpath.4=lib/commons-collections-3.1.jar classpath.4=lib/commons-collections-3.1.jar
classpath.5=lib/commons-httpclient-3.1.jar classpath.5=lib/commons-httpclient-3.1.jar
classpath.6=lib/commons-logging-1.0.4.jar classpath.6=lib/commons-logging-1.0.4.jar
classpath.7=lib/htmlcleaner-2.1.jar classpath.7=lib/htmlcleaner-2.2.jar
classpath.8=lib/jackrabbit-webdav-1.4.jar classpath.8=lib/jackrabbit-webdav-1.4.jar
classpath.9=lib/jcharset-1.3.jar classpath.9=lib/jcharset-1.3.jar
classpath.10=lib/jcifs-1.3.14.jar classpath.10=lib/jcifs-1.3.14.jar