From: Radek Czajka Date: Tue, 4 Jan 2011 13:21:14 +0000 (+0100) Subject: #994: highlighting strange characters X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/9c5634fbc60d6e9dbb9f28d4cbbabd9822498646?ds=sidebyside #994: highlighting strange characters --- diff --git a/redakcja/static/css/html.css b/redakcja/static/css/html.css index 9eb4089d..91868e3e 100644 --- a/redakcja/static/css/html.css +++ b/redakcja/static/css/html.css @@ -634,6 +634,10 @@ div[x-node] > .uwaga { border: 1px solid orange; } +.alien { + color: red; +} + /* specialChars */ #specialCharsContainer { text-align: center; diff --git a/redakcja/static/js/wiki/xslt.js b/redakcja/static/js/wiki/xslt.js index 99266732..daa18f65 100644 --- a/redakcja/static/js/wiki/xslt.js +++ b/redakcja/static/js/wiki/xslt.js @@ -61,6 +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'); var parser = new DOMParser(); var serializer = new XMLSerializer(); var doc = parser.parseFromString(xml, 'text/xml'); diff --git a/redakcja/static/xsl/wl2html_client.xsl b/redakcja/static/xsl/wl2html_client.xsl index a3346d17..55b3bf54 100644 --- a/redakcja/static/xsl/wl2html_client.xsl +++ b/redakcja/static/xsl/wl2html_client.xsl @@ -820,5 +820,12 @@ - + + + + + + + + \ No newline at end of file