// 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 {
// 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
+?>