From 68217c548a024f3f7d7d667ce4b825cf61ae46a9 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 03 Jun 2008 13:07:53 -0400
Subject: [PATCH] -add convert encoding before html parsing
---
program/lib/washtml.php | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index 82ccc0c..f45fd45 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -187,6 +187,7 @@
//Charset seems to be ignored (probably if defined in the HTML document)
$node = new DOMDocument('1.0', $config['charset']);
$full = true;
+ $html = mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8');
@$node->loadHTML($html);
return self::dumpHtml($node, $config, $full);
}
--
Gitblit v1.9.1