[Pkg-mozext-commits] [sage-extension] 16/49: proper handling of Atom application/xhtml+xml content type

David Prévot taffit at moszumanska.debian.org
Fri May 1 03:10:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag sage_1_3_10
in repository sage-extension.

commit 8aa1a5d6557e9ffd893335821701403b0d741cee
Author: Peter Andrews <petea at jhu.edu>
Date:   Sun Jun 12 22:14:26 2005 +0000

    proper handling of Atom application/xhtml+xml content type
---
 src/sage/content/feedlib.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/sage/content/feedlib.js b/src/sage/content/feedlib.js
index df5e5a0..7b50bff 100644
--- a/src/sage/content/feedlib.js
+++ b/src/sage/content/feedlib.js
@@ -216,9 +216,14 @@ Feed.prototype.parseAtom = function() {
 
 		var contentNodes = aEntryNode.getElementsByTagName("content");
 		var contentArray = new Array();
+		var xmlSerializer = new XMLSerializer();
 		for(j = 0; j < contentNodes.length; j++) {
 			var contType = contentNodes[j].getAttribute("type");
-			contentArray[contType] = CommonFunc.getInnerText(contentNodes[j]);
+			if(contType == "application/xhtml+xml") {
+				contentArray[contType] = xmlSerializer.serializeToString(contentNodes[j]);
+			} else {
+				contentArray[contType] = CommonFunc.getInnerText(contentNodes[j]);
+			}
 		}
 
 		var summaryNodes = aEntryNode.getElementsByTagName("summary");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/sage-extension.git



More information about the Pkg-mozext-commits mailing list