From cd4f9e723572d43142e712e9eb40659bf49073bd Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 20 Jul 2011 13:31:18 +0000 Subject: [PATCH] Save application/xhtml+xml using WebPageDump Fixes http://forums.zotero.org/discussion/18808/bug-snapshot-of-page-produces-xml-parsing-error/ --- chrome/content/zotero/xpcom/attachments.js | 2 +- chrome/content/zotero/xpcom/mime.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 5d371d48af..86a53a1a82 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -566,7 +566,7 @@ Zotero.Attachments = new function(){ }; } - if (mimeType == 'text/html') { + if (mimeType === 'text/html' || mimeType === 'application/xhtml+xml') { var sync = true; // Load WebPageDump code diff --git a/chrome/content/zotero/xpcom/mime.js b/chrome/content/zotero/xpcom/mime.js index 53d0135e3f..316c1652ce 100644 --- a/chrome/content/zotero/xpcom/mime.js +++ b/chrome/content/zotero/xpcom/mime.js @@ -109,6 +109,7 @@ Zotero.MIME = new function(){ // Enforce some extensions switch (mimeType) { case 'text/html': + case 'application/xhtml+xml': return 'html'; case 'application/pdf':