Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-9147

  • Loading branch information...
commit c63af80f8540a12a55d748353494f68862a7dc9f 1 parent 09bd9bb
authored April 03, 2007

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  filter/tidy/filter.php
8  filter/tidy/filter.php
@@ -17,7 +17,7 @@
17 17
 * @param        string         text to be filtered
18 18
 */
19 19
 function tidy_filter($courseid, $text) {
20  
-       
  20
+    global $CFG;   
21 21
 /// Configuration for tidy. Feel free to tune for your needs, e.g. to allow
22 22
 /// proprietary markup.
23 23
     $tidyoptions = array(             
@@ -39,7 +39,11 @@ function tidy_filter($courseid, $text) {
39 39
     
40 40
 /// If enabled: run tidy over the entire string
41 41
     if (function_exists('tidy_repair_string')){
42  
-        $text = tidy_repair_string($text, $tidyoptions);
  42
+        if (empty($CFG->unicodedb)) {
  43
+            $text = tidy_repair_string($text, $tidyoptions);
  44
+        } else {
  45
+            $text = tidy_repair_string($text, $tidyoptions, 'utf8');
  46
+        }
43 47
     }
44 48
 
45 49
     return $text;

0 notes on commit c63af80

Please sign in to comment.
Something went wrong with that request. Please try again.