andreskrey/readability.php

setFixRelativeURLs doesn't seem to apply to image URLs

W3Extensions opened this issue · 3 comments

Readability isn't setting relative URLs for the image source/src.

It does set absolute URLs here: https://github.com/andreskrey/readability.php/blob/master/src/Readability.php#L405

Can you provide an example where this doesn't work as expected?

Could not reproduce. I'm sure your forgetting to declare the original URL in the Configuration object. It should look like this:

$readability = new Readability((new Configuration())
    ->setFixRelativeURLs(true)
    ->setOriginalURL('https://www.userchrome.org/what-is-userchrome-css.html')
);