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

Resolve relative href during discovery #417

Open
sybereal opened this issue Jul 16, 2023 · 0 comments
Open

Resolve relative href during discovery #417

sybereal opened this issue Jul 16, 2023 · 0 comments

Comments

@sybereal
Copy link

Currently, if a page contains a feed link with, e.g., href="/rss.xml" or href="rss.xml", feed discovery will return the relative URL as is, instead of resolving it to an absolute URL.

I don't really have any experience with PHP, but if you could give some pointers on how to implement it. There was an existing PR in nextcloud/news#1631, but that seems to depend on pear/net_url2, and I can understand if you do not want to add another dependency just for this.

IgorA100 added a commit to IgorA100/feed-io that referenced this issue Oct 14, 2023
Feed discovery with relative URLs in links
Example: https://k47.cz/
Solution to the problem: alexdebril#417
alexdebril pushed a commit that referenced this issue Oct 16, 2023
* Fix: Relative URLs in links

Feed discovery with relative URLs in links
Example: https://k47.cz/
Solution to the problem: #417

* Update Feed.php (Fix relative URLs in links)

We will replace the links (add the host if it doesn’t exist) in the content as well

* Update Node.php (Fix relative URLs in links)

* Update Reader.php (Fix relative URLs in links)

Remember the URL for further processing

* Update Link.php (Fix relative URLs in links)

* Update XmlParser.php (Fix relative URLs in links)

* Update Explorer.php

* Update Node.php

Delete tabs
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

1 participant