[RDF] Encode > in content when serializing to XML

This avoids the invalid combination "]]>" from appearing in the output
This commit is contained in:
aurimasv 2014-05-01 15:43:35 -05:00
parent c1c0b42a12
commit c9346d4caa

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) {