Quote ampersend chars in XML text. Closes #263.

cdb-0.9
Sandro Santilli 12 years ago
parent e9c1e3925d
commit ebf08584d3

@ -7,7 +7,8 @@ tree.Quoted = function Quoted(content) {
tree.Quoted.prototype = {
toString: function(quotes) {
var xmlvalue = this.value.replace(/\'/g, ''');
var xmlvalue = this.value.replace(/&/g, '&');
xmlvalue = xmlvalue.replace(/\'/g, ''');
return (quotes === true) ? "'" + xmlvalue + "'" : this.value;
},

Loading…
Cancel
Save