fix invalid exchange html : remove inline uppercase processing instructions

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@85 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2007-10-23 08:24:17 +00:00
parent 2d52f3f942
commit 2a29a7a7c4
1 changed files with 4 additions and 3 deletions

View File

@ -92,7 +92,7 @@ public class ExchangeSession {
public static final String CONTENT_TYPE_HEADER = "content-type: ";
public static final String CONTENT_TRANSFER_ENCODING_HEADER = "content-transfer-encoding: ";
public static final String CONTENT_DISPOSITION_HEADER = "content-disposition: ";
public static final String CONTENT_ID_HEADER = "content-id: ";
public static final String CONTENT_ID_HEADER = "content-id: ";
private static final int DEFAULT_KEEP_DELAY = 30;
@ -970,7 +970,7 @@ public class ExchangeSession {
headerBuffer.append("\r\n");
os.write(headerBuffer.toString().getBytes());
writeBody(os, bodyHeader);
os.write((mimeHeader.boundary+"--\r\n").getBytes());
os.write((mimeHeader.boundary + "--\r\n").getBytes());
}
}
@ -1327,6 +1327,7 @@ public class ExchangeSession {
.replaceFirst("xmlns=\".*\"", "")
// quick fix remove inline processing instructions
.replaceAll("<\\?xml:namespace", "")
.replaceAll("<\\?XML:NAMESPACE", "")
// quick fix invalid comments
.replaceAll("<!---", "<!-- -")
.getBytes("UTF-8"));
@ -1572,7 +1573,7 @@ public class ExchangeSession {
contentId = contentId.substring(1);
}
if (contentId.endsWith(">")) {
contentId = contentId.substring(0, contentId.length()-1);
contentId = contentId.substring(0, contentId.length() - 1);
}
}
line = fixRenamedAttachment(reader.readLine(), currentAttachmentName);