From 8d4f8f5c9e0c676a4d4c843633f339f47186a2f1 Mon Sep 17 00:00:00 2001 From: TaguchiKatan Date: Sun, 1 Sep 2013 11:20:42 +0900 Subject: [PATCH] for corruption of text --- OpenGraph.php | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenGraph.php b/OpenGraph.php index af2e7b6..aa7f584 100644 --- a/OpenGraph.php +++ b/OpenGraph.php @@ -82,6 +82,7 @@ static private function _parse($HTML) { $old_libxml_error = libxml_use_internal_errors(true); $doc = new DOMDocument(); + $HTML = mb_convert_encoding($HTML, 'HTML-ENTITIES', 'auto'); $doc->loadHTML($HTML); libxml_use_internal_errors($old_libxml_error);