Permalink
Browse files

MDL-9147

  • Loading branch information...
nicolasconnault
nicolasconnault committed Apr 3, 2007
1 parent 9e6e743 commit 552de335d050dcac57f3f12e6958da2da2837a72
Showing with 6 additions and 2 deletions.
  1. +6 −2 filter/tidy/filter.php
View
@@ -17,7 +17,7 @@
* @param string text to be filtered
*/
function tidy_filter($courseid, $text) {
global $CFG;
/// Configuration for tidy. Feel free to tune for your needs, e.g. to allow
/// proprietary markup.
$tidyoptions = array(
@@ -39,7 +39,11 @@ function tidy_filter($courseid, $text) {
/// If enabled: run tidy over the entire string
if (function_exists('tidy_repair_string')){
$text = tidy_repair_string($text, $tidyoptions);
if (empty($CFG->unicodedb)) {
$text = tidy_repair_string($text, $tidyoptions);
} else {
$text = tidy_repair_string($text, $tidyoptions, 'utf8');
}
}
return $text;

0 comments on commit 552de33

Please sign in to comment.