another fix for broken office xml

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@22 3d1905a2-6b24-0410-a738-b14d5a86fcbd
master
mguessan 2007-01-10 14:43:52 +00:00
parent d0c1710ab9
commit 5bb3bab6c0
1 changed files with 2 additions and 0 deletions

View File

@ -1078,6 +1078,8 @@ public class ExchangeSession {
ByteArrayInputStream bais = new ByteArrayInputStream(htmlBody ByteArrayInputStream bais = new ByteArrayInputStream(htmlBody
// quick fix remove default office namespace // quick fix remove default office namespace
.replaceFirst("xmlns=\".*\"", "") .replaceFirst("xmlns=\".*\"", "")
// quick fix remove inline processing instructions
.replaceAll("<\\?xml:namespace", "")
.getBytes("UTF-8")); .getBytes("UTF-8"));
XmlDocument xmlBody = tidyDocument(bais); XmlDocument xmlBody = tidyDocument(bais);
List<Attribute> htmlBodyImgList = xmlBody.getNodes("//img/@src"); List<Attribute> htmlBodyImgList = xmlBody.getNodes("//img/@src");