chg: [feed] Check also URL without protocol

pull/6521/head
Jakub Onderka 2020-10-29 18:55:17 +01:00
parent 3c8b9c0fe4
commit b749610c56
1 changed files with 9 additions and 0 deletions

View File

@ -380,6 +380,15 @@ class Feed extends AppModel
}
} else {
$parts = [$attribute['value']];
// Some feeds contains URL without protocol, so if attribute is URL and value contains protocol,
// we will check also value without protocol.
if ($attribute['type'] === 'url' || $attribute['type'] === 'uri') {
$protocolPos = strpos($attribute['value'], '://');
if ($protocolPos !== false) {
$parts[] = substr($attribute['value'], $protocolPos + 3);
}
}
}
foreach ($parts as $part) {