Merge pull request #10066 from annando/decode
ParseUrl: Perform entity decode afterwards
This commit is contained in:
commit
aaf94531a9
|
@ -466,8 +466,7 @@ class ParseUrl
|
|||
$list = $xpath->query("//script[@type='application/ld+json']");
|
||||
foreach ($list as $node) {
|
||||
if (!empty($node->nodeValue)) {
|
||||
$nodevalue = html_entity_decode($node->nodeValue, ENT_COMPAT, 'UTF-8');
|
||||
if ($jsonld = json_decode($nodevalue, true)) {
|
||||
if ($jsonld = json_decode($node->nodeValue, true)) {
|
||||
$siteinfo = self::parseParts($siteinfo, $jsonld);
|
||||
}
|
||||
}
|
||||
|
@ -705,6 +704,12 @@ class ParseUrl
|
|||
}
|
||||
}
|
||||
|
||||
array_walk_recursive($siteinfo, function (&$element) {
|
||||
if (is_string($element)) {
|
||||
$element = html_entity_decode($element, ENT_COMPAT, 'UTF-8');
|
||||
}
|
||||
});
|
||||
|
||||
return $siteinfo;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue