Merge remote-tracking branch 'upstream/develop' into search
This commit is contained in:
commit
7b638617f1
2 changed files with 3 additions and 2 deletions
|
@ -302,6 +302,7 @@ class HTML
|
||||||
self::tagToBBCode($doc, 'a', ['href' => '/(.+)/'], '[url=$1]', '[/url]');
|
self::tagToBBCode($doc, 'a', ['href' => '/(.+)/'], '[url=$1]', '[/url]');
|
||||||
|
|
||||||
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'alt' => '/(.+)/'], '[img=$1]$2', '[/img]', true);
|
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'alt' => '/(.+)/'], '[img=$1]$2', '[/img]', true);
|
||||||
|
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'title' => '/(.+)/'], '[img=$1]$2', '[/img]', true);
|
||||||
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/'], '[img=$2x$3]$1', '[/img]', true);
|
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/'], '[img=$2x$3]$1', '[/img]', true);
|
||||||
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/'], '[img]$1', '[/img]', true);
|
self::tagToBBCode($doc, 'img', ['src' => '/(.+)/'], '[img]$1', '[/img]', true);
|
||||||
|
|
||||||
|
|
|
@ -2207,7 +2207,7 @@ class GServer
|
||||||
*/
|
*/
|
||||||
private static function analyseRootBody($curlResult, array $serverdata): array
|
private static function analyseRootBody($curlResult, array $serverdata): array
|
||||||
{
|
{
|
||||||
if (empty($curlResult->getBody())) {
|
if (empty($curlResult->getBodyString())) {
|
||||||
return $serverdata;
|
return $serverdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2220,7 +2220,7 @@ class GServer
|
||||||
$platforms = array_merge($ap_platforms, $dfrn_platforms, $zap_platforms, $platforms);
|
$platforms = array_merge($ap_platforms, $dfrn_platforms, $zap_platforms, $platforms);
|
||||||
|
|
||||||
$doc = new DOMDocument();
|
$doc = new DOMDocument();
|
||||||
@$doc->loadHTML($curlResult->getBody());
|
@$doc->loadHTML($curlResult->getBodyString());
|
||||||
$xpath = new DOMXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
$assigned = false;
|
$assigned = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue