From: Radek Czajka Date: Thu, 20 May 2021 15:03:33 +0000 (+0200) Subject: Fixes #4207: Use required entites in serializing attributes. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/b16fda1ce7ca588d38768ca05da5d3702bd135df?hp=7c12614b8a982578f1e98a29d35ba300eb229681 Fixes #4207: Use required entites in serializing attributes. --- diff --git a/src/redakcja/static/js/wiki/xslt.js b/src/redakcja/static/js/wiki/xslt.js index b1adc8ec..5111ae7d 100644 --- a/src/redakcja/static/js/wiki/xslt.js +++ b/src/redakcja/static/js/wiki/xslt.js @@ -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 */