Skip to content

Commit

Permalink
Convert encoding correctly on HTML load
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jul 27, 2015
1 parent 5e216c2 commit 4f405b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Dom/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ public function load($content = null) {

libxml_use_internal_errors(true);

//$string = html_entity_decode($string, ENT_HTML5);
$this->domDocument->loadHTML($string);
$this->domDocument->loadHTML(mb_convert_encoding(
$string, "HTML-ENTITIES", "UTF-8")
);
}

/**
Expand Down

0 comments on commit 4f405b8

Please sign in to comment.