af_redditimgur: absolutize links before working on them

This commit is contained in:
Andrew Dolgov 2022-07-27 07:16:57 +03:00
parent 4e02dc0ab5
commit 6a68ed0208
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
1 changed files with 3 additions and 1 deletions

View File

@ -651,7 +651,9 @@ class Af_RedditImgur extends Plugin {
$xpath = new DOMXPath($doc); $xpath = new DOMXPath($doc);
/** @var ?DOMElement $content_link */ /** @var ?DOMElement $content_link */
$content_link = $xpath->query("(//a[contains(., '[link]')])")->item(0); $content_link = UrlHelper::rewrite_relative($article["link"],
$xpath->query("(//a[contains(., '[link]')])")->item(0),
"a");
if ($this->host->get($this, "enable_content_dupcheck")) { if ($this->host->get($this, "enable_content_dupcheck")) {