From 9c5634fbc60d6e9dbb9f28d4cbbabd9822498646 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 4 Jan 2011 14:21:14 +0100 Subject: [PATCH] #994: highlighting strange characters --- redakcja/static/css/html.css | 4 ++++ redakcja/static/js/wiki/xslt.js | 1 + redakcja/static/xsl/wl2html_client.xsl | 9 ++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) 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 -- 2.20.1