Fixes #4207: Use required entites in serializing attributes.
[redakcja.git] / src / redakcja / static / js / wiki / xslt.js
index b1adc8e..5111ae7 100644 (file)
@@ -352,7 +352,7 @@ HTMLSerializer.prototype._serializeElement = function(node) {
                };
 
                self.result += ' ' + self._join(nsData.prefix, node.getAttribute('x-attr-name-'+this));
-               self.result += '="'+node.getAttribute('x-attr-value-'+this) +'"';
+               self.result += '="' + node.getAttribute('x-attr-value-'+this).replace(/&/g, '&').replace(/"/g, '"') + '"';
        });
 
        /* print new namespace declarations */