Skip to content

Commit

Permalink
-add convert encoding before html parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jun 3, 2008
1 parent 02548b9 commit 68217c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions program/lib/washtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ static function wash($html, $config=array(), &$full=true) {
//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);
}
Expand Down

0 comments on commit 68217c5

Please sign in to comment.