From: Radek Czajka Date: Tue, 21 Jun 2011 14:27:05 +0000 (+0200) Subject: #1557: colouring ampersand breaks XML X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/9f5909ffb6a680a86c2da4a260df92df8e88c3b3?ds=sidebyside #1557: colouring ampersand breaks XML --- 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');