From a9bbe0b12882db9d9c3192c3cd0055a50e9c34d5 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Fri, 2 Nov 2018 22:40:48 +0100 Subject: Update Linkinfo.php --- Zotlabs/Module/Linkinfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 4bd1deefb..6b067f6fd 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -230,9 +230,9 @@ class Linkinfo extends \Zotlabs\Web\Controller { $body = $result['body']; // Check codepage in page or in HTTP headers if not exist - $cp = (preg_match('/meta.+content=["|\']text\/html;\s+charset=([^"|\']+)/i', $body, $o) ? $o[1] : ''); + $cp = (preg_match('/meta.+content=["|\']text\/html; charset=([^"|\']+)/i', $body, $o) ? $o[1] : ''); if(empty($cp) || strtoupper($cp) == 'ISO-8859-5') - $cp = (preg_match('/Content-Type: text\/html;\s+charset=(.+)/im', $header, $o) ? $o[1] : 'AUTO'); + $cp = (preg_match('/Content-Type: text\/html; charset=(.+)/im', $header, $o) ? $o[1] : 'AUTO'); $body = mb_convert_encoding($body, 'UTF-8', $cp); $body = mb_convert_encoding($body, 'HTML-ENTITIES', "UTF-8"); -- cgit v1.2.3