[RDF] Encode > in content when serializing to XML
This avoids the invalid combination "]]>" from appearing in the output
This commit is contained in:
parent
c1c0b42a12
commit
c9346d4caa
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue