Update Linkinfo.php

This commit is contained in:
Max Kostikov 2018-10-24 10:28:18 +02:00
parent 781eeff021
commit 24d68a7f09

View File

@ -229,7 +229,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$header = $result['header'];
$body = $result['body'];
$body = mb_convert_encoding($body, 'UTF-8', (preg_match('/meta\s+http-equiv=.content-type.+;\s+charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8'));
$body = mb_convert_encoding($body, 'UTF-8', (preg_match('/meta.+content=["|\']text\/html;\s+charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8'));
$body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8");
$doc = new \DOMDocument();