Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: The scheme href='https is invalid. #14

Closed
jeffbotw opened this issue Feb 14, 2023 · 2 comments
Closed

Exception: The scheme href='https is invalid. #14

jeffbotw opened this issue Feb 14, 2023 · 2 comments

Comments

@jeffbotw
Copy link

jeffbotw commented Feb 14, 2023

I'm getting a lot of errors related to the URI lib, such as:
Exception: The scheme `href='https` is invalid. /home/[...REMOVED...]/public_html/application/third_party/Readability.php/v3.1.2/vendor/league/uri/src/Uri.php 249

@fivefilters
Copy link
Owner

Thanks for reporting this @jeffbotw. Are you able to provide the code you used that led to the error so we can try to reproduce it. If not, can you provide the URL of the page which caused the error?

@fivefilters
Copy link
Owner

fivefilters commented Mar 3, 2023

We were able to reproduce this. It ocurred when Readability.php was set to rewrite relative URLs:

$configuration = new Configuration();
$configuration
    ->setFixRelativeURLs(true)
    ->setOriginalURL('http://example.com/article.html');
$readability = new Readability($configuration);

and the HTML being parsed contained invalid URL, e.g.

<article>
    <h1>Title</h1>
    <p>Paragraph of text.</p>
    <p>Paragraph with bad link: <a href="href='https:/bad'">test</a></p>
</article>

Fixed in 3.1.3: https://github.com/fivefilters/readability.php/releases/tag/v3.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants