Merge pull request #11333 from annando/feed-guid

Don't use the GUID value directly
This commit is contained in:
Hypolite Petovan 2022-03-14 18:02:29 -04:00 committed by GitHub
commit 371b2b22bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,9 @@ class Feed
$guid = XML::getFirstNodeValue($xpath, 'guid/text()', $entry); $guid = XML::getFirstNodeValue($xpath, 'guid/text()', $entry);
if (!empty($guid)) { if (!empty($guid)) {
$item["uri"] = $guid; $item["uri"] = $guid;
$item["guid"] = $guid;
// Don't use the GUID value directly but instead use it as a basis for the GUID
$item["guid"] = Item::guidFromUri($guid, parse_url($guid, PHP_URL_HOST) ?? parse_url($item["plink"], PHP_URL_HOST));
} }
if (empty($item["uri"])) { if (empty($item["uri"])) {