- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-
1321796513
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\DI;
+use GuzzleHttp\Psr7\Uri;
/**
* Proxy utilities class
*/
private static function parseQuery(string $url): array
{
- $query = parse_url($url, PHP_URL_QUERY);
- $query = html_entity_decode($query);
+ try {
+ $uri = new Uri($url);
- parse_str($query, $arr);
+ parse_str($uri->getQuery(), $arr);
- return $arr;
+ return $arr;
+ } catch (\Throwable $e) {
+ return [];
+ }
}
/**