summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 71ac965..f20c4be 100644
--- a/it_html.class
+++ b/it_html.class
@@ -431,9 +431,11 @@ function _strip_tags($html)
function sanitize($html)
{
$result = "";
+ $charset = $GLOBALS['it_html']->p['charset'] ? $GLOBALS['it_html']->p['charset'] : 'iso-8859-1';
+ if ($charset == "utf-8")
+ $html = it::any2utf8($html);
$html = it::replace(array('[\0\s]+' => " "), $html); # \s also matches \r and \n
$urlpattern = 'https?://[^">]+';
- $charset = $GLOBALS['it_html']->p['charset'] ? $GLOBALS['it_html']->p['charset'] : 'iso-8859-1';
if ($tag = it::match("(.*)<(div|p|i|b)\b[^>]*>(.*?)</\\2>(.*)", $html))
{