From c9346d4caad8f0b94786408a2b0fb04ccd620fee Mon Sep 17 00:00:00 2001 From: aurimasv Date: Thu, 1 May 2014 15:43:35 -0500 Subject: [PATCH] [RDF] Encode > in content when serializing to XML This avoids the invalid combination "]]>" from appearing in the output --- chrome/content/zotero/xpcom/rdf/serialize.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/rdf/serialize.js b/chrome/content/zotero/xpcom/rdf/serialize.js index 472d7de7a5..091e71cec0 100644 --- a/chrome/content/zotero/xpcom/rdf/serialize.js +++ b/chrome/content/zotero/xpcom/rdf/serialize.js @@ -678,7 +678,10 @@ $rdf.Serializer = function () { function escapeForXML(str) { if(typeof str == 'undefined') return '@@@undefined@@@@'; - return str.replace(/&/g, '&').replace(//g, '>') + .replace(/"/g, '"'); } function relURI(term) {