diff options
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 534e5697b..715cda356 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -228,10 +228,8 @@ class Linkinfo extends \Zotlabs\Web\Controller { $header = $result['header']; $body = $result['body']; - - $x = preg_match('/<meta\s+http-equiv=.content-type.+; charset=([^"|\']+)/i', $body, $o); - - $body = mb_convert_encoding($body, 'UTF-8', ($o[1] ? $o[1] : 'UTF-8')); + + $body = mb_convert_encoding($body, 'UTF-8', (preg_match('/<meta\s+http-equiv=.content-type.+; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'UTF-8')); $body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8"); $doc = new \DOMDocument(); |