Enfore ISO-8859-1 encoding for htmlentities().
[diogenes.git] / include / Text / Wiki / Render / Xhtml / Code.php
index 306c3e4..f95267c 100644 (file)
@@ -84,7 +84,7 @@ class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render {
             // convert entities.
             $text = str_replace("\t", "    ", $text);
             $text = "<html>\n$text\n</html>";
-            $text = htmlentities($text);
+            $text = htmlentities($text, ENT_COMPAT | ENT_HTML401, "ISO-8859-1");
             $text = "<pre$css><code$css_html>$text</code></pre>";
             
         } else {
@@ -92,11 +92,11 @@ class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render {
             // convert tabs to four spaces,
             // convert entities.
             $text = str_replace("\t", "    ", $text);
-            $text = htmlentities($text);
+            $text = htmlentities($text, ENT_COMPAT | ENT_HTML401, "ISO-8859-1");
             $text = "<pre$css><code$css_code>$text</code></pre>";
         }
         
         return "\n$text\n\n";
     }
 }
-?>
\ No newline at end of file
+?>