From: Gabriel Wicke Date: Fri, 7 May 2004 09:06:45 +0000 (+0000) Subject: add encoding option X-Git-Tag: 1.3.0beta1~129 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=dc58bc8458731c93f96da3c3c2c79b9e6afcbfc9;p=lhc%2Fweb%2Fwiklou.git add encoding option --- diff --git a/includes/Parser.php b/includes/Parser.php index ed67b7a08c..898faf0ffd 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -405,7 +405,19 @@ class Parser /* interface with html tidy, used if $wgUseTidy = true */ function tidy ( $text ) { global $wgTidyConf, $wgTidyBin, $wgTidyOpts; + global $wgInputEncoding, $wgOutputEncoding; $cleansource = ''; + switch(strtoupper($wgOutputEncoding)) { + case 'ISO-8859-1': + $wgTidyOpts .= ($wgInputEncoding == $wgOutputEncoding)? ' -latin1':' -raw'; + break; + case 'UTF-8': + $wgTidyOpts .= ($wgInputEncoding == $wgOutputEncoding)? ' -utf8':' -raw'; + break; + default: + $wgTidyOpts .= ' -raw'; + } + $text = ''. 'test'.$text.'';