Update Linkinfo.php
This commit is contained in:
parent
a7624ea48b
commit
46b0510b99
@ -230,7 +230,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
$body = $result['body'];
|
$body = $result['body'];
|
||||||
|
|
||||||
// Check codepage in HTTP headers or HTML if not exist
|
// Check codepage in HTTP headers or HTML if not exist
|
||||||
$cp = (preg_match('/Content-Type: text\/html; charset=(.+)/i', $header, $o) ? trim($o[1]) : '');
|
$cp = (preg_match('/Content-Type: text\/html; charset=(.+)\r\n/i', $header, $o) ? $o[1] : '');
|
||||||
if(empty($cp))
|
if(empty($cp))
|
||||||
$cp = (preg_match('/meta.+content=["|\']text\/html; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'AUTO');
|
$cp = (preg_match('/meta.+content=["|\']text\/html; charset=([^"|\']+)/i', $body, $o) ? $o[1] : 'AUTO');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user