commit c9346d4caad8f0b94786408a2b0fb04ccd620fee
parent c1c0b42a12fd057bd110e73de9c7898d0a3a7ea4
Author: aurimasv <aurimas.dev@gmail.com>
Date: Thu, 1 May 2014 15:43:35 -0500
[RDF] Encode > in content when serializing to XML
This avoids the invalid combination "]]>" from appearing in the output
Diffstat:
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
@@ -678,7 +678,10 @@ $rdf.Serializer = function () {
function escapeForXML(str) {
if(typeof str == 'undefined') return '@@@undefined@@@@';
- return str.replace(/&/g, '&').replace(/</g, '<').replace(/"/g, '"');
+ return str.replace(/&/g, '&')
+ .replace(/</g, '<')
+ .replace(/>/g, '>')
+ .replace(/"/g, '"');
}
function relURI(term) {