Merge pull request #477 from aurimasv/RDF-serialize-XML

[RDF] Encode > in content when serializing to XML
This commit is contained in:
Simon Kornblith 2014-05-01 16:59:29 -04:00
commit 971fa7cf65

View file

@ -678,7 +678,10 @@ $rdf.Serializer = function () {
function escapeForXML(str) {
if(typeof str == 'undefined') return '@@@undefined@@@@';
return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
return str.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
}
function relURI(term) {