From b16fda1ce7ca588d38768ca05da5d3702bd135df Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 20 May 2021 17:03:33 +0200 Subject: [PATCH 1/1] Fixes #4207: Use required entites in serializing attributes. --- src/redakcja/static/js/wiki/xslt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.20.1