-
Notifications
You must be signed in to change notification settings - Fork 345
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
Favicon improvements #1152
Merged
Merged
Favicon improvements #1152
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jtojnar
commented
Oct 12, 2019
jtojnar
force-pushed
the
favicon-improvements
branch
2 times, most recently
from
October 15, 2019 13:13
0c07cc0
to
a7a9ff7
Compare
That is probably what the site intends, when it provides a feed logo.
jtojnar
force-pushed
the
favicon-improvements
branch
5 times, most recently
from
May 1, 2020 22:45
a4676ce
to
0eac1e2
Compare
for feeds that do not have logo nor homepage for its favicon to get
There were actually two issues: * The Guzzle options array contained `allow_redirects` key twice, losing the `redirects` option. * The redirection stack was concatenated with +, causing the first URL in the stack to be overwritten by the initial URL.
And add a helper for obtaining effective URL.
Previously, we chose the icon from the HTML based on their type and when the link was broken we did not try another one. Additionally, we previously [1] accidentally stopped recognizing icons that used uppercase letters. This commit fixes both by switching to a more robust regex-based parser and returning array of icons sorted by their size, that will be checked until we find a working one. [1]: 6e0494c Fixes #1122 Co-Authored-By: Jan Tojnar <[email protected]>
Previously, relative links to icons were resolved against the request URL, which need not be the final when redirects come into play. We obtain the effective URL we are redirected to and resolve links relative to that. Co-Authored-By: Jan Tojnar <[email protected]>
Headers should be enough for most cases, you can set DEBUG to 2 to include bodies again.
HTML supports omitting quotes from attributes: https://www.w3.org/TR/2012/WD-html-markup-20120329/syntax.html#attr-value-unquoted We need to support that too. It is used for example on xda-developers.com.
jtojnar
force-pushed
the
favicon-improvements
branch
from
May 2, 2020 00:10
0eac1e2
to
eb35239
Compare
This was referenced May 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces #1124