From 9f5909ffb6a680a86c2da4a260df92df8e88c3b3 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 21 Jun 2011 16:27:05 +0200 Subject: [PATCH] #1557: colouring ampersand breaks XML --- redakcja/static/js/wiki/xslt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redakcja/static/js/wiki/xslt.js b/redakcja/static/js/wiki/xslt.js index c7b846b5..cc2d19f2 100644 --- a/redakcja/static/js/wiki/xslt.js +++ b/redakcja/static/js/wiki/xslt.js @@ -61,7 +61,7 @@ function withThemes(code_block, onError) function xml2html(options) { withStylesheets(function() { var xml = options.xml.replace(/\/(\s+)/g, '
$1'); - xml = xml.replace(/([^a-zA-Z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s<>«»\\*_!,:;?%."'=#()\/-]+)/g, '$1'); + xml = xml.replace(/([^a-zA-Z0-9ąćęłńóśźżĄĆĘŁŃÓŚŹŻ\s<>«»\\*_!,:;?&%."'=#()\/-]+)/g, '$1'); var parser = new DOMParser(); var serializer = new XMLSerializer(); var doc = parser.parseFromString(xml, 'text/xml'); -- 2.20.1