X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FParseUrl.php;h=4611cf8efe5f25378caa699044543af6269bab4c;hb=b5ad8c3e153976cf3e63753597377f09852d98d7;hp=0183d6b14ae5be6785f90eaf5c16af01e6974de9;hpb=8b7cb5d9efeab580c2592e0fbe301f7142b73a3d;p=friendica.git diff --git a/src/Util/ParseUrl.php b/src/Util/ParseUrl.php index 0183d6b14a..4611cf8efe 100644 --- a/src/Util/ParseUrl.php +++ b/src/Util/ParseUrl.php @@ -187,7 +187,7 @@ class ParseUrl * * @endverbatim */ - public static function getSiteinfo(string $url, bool $do_oembed = true, int $count = 1) + public static function getSiteinfo(string $url, bool $do_oembed = true, int $count = 1): array { if (empty($url)) { return [ @@ -214,7 +214,7 @@ class ParseUrl ]; if ($count > 10) { - Logger::notice('Endless loop detected', ['url' => $url]); + Logger::warning('Endless loop detected', ['url' => $url]); return $siteinfo; } @@ -287,22 +287,22 @@ class ParseUrl // Expected form: Content-Type: text/html; charset=ISO-8859-4 if (preg_match('/charset=([a-z0-9-_.\/]+)/i', $curlResult->getContentType(), $matches)) { $charset = trim(trim(trim(array_pop($matches)), ';,')); + } else { + // Then in body that gets precedence + // Expected forms: + // - + // - + // - + // - + // We escape