Feature Request #27
get_favicon() should try to get favicons that are located in non-standard locations (favicon autodiscovery)
| Status: | New | Start: | 2008-02-05 | |
| Priority: | Medium | Due date: | ||
| Assigned to: | Ryan Parman | % Done: | 0% |
|
| Category: | Miscellaneous | |||
| Target version: | 1.3 | |||
Description
Sometimes sites define their favicon location using a
<link rel="shortcut icon" href="http://some.other.domain.com/some_diretory/some_file.ico" />
tag instead of placing it at http://domain.com/favicon.ico. This might be done especially on larger sites that use a CDN or networks of sites that all share the same favicon file.
The attached patch is how I added this functionality for a recent project. I'd love to see it rolled into SimplePie proper in some way, shape or form.
History
Updated by Geoffrey Sneddon 905 days ago
There used to be such functionality in SimplePie. See this and r758 (which did it in a similar way to you). How this is done has major issues — do we take the favicon from the feed link, or from the root of the location of the feed; we don't use an HTML parser to try and find it; @rel is a space separated list — icon and shortcut are different keywords and order is irrelevant (and they could have stuff in between them too) — and we should only look for icon; we don't properly sniff if the content is HTML; we assume the HTML is encoded in a US-ASCII superset and hope that the URL we get is purely made up of US-ASCII characters.
Updated by Ryan Parman 875 days ago
- Assigned to set to Ryan Parman
- Target version set to 1.2
This definitely needs to be thought through a bit more to be as efficient as possible and as correctly as possible. Does this depend on any of the IRI issues?
Updated by Geoffrey Sneddon 875 days ago
Off the top of my head, no.
I still, however, think we shouldn't do this. Nothing else does it. We should look in a link from the feed and in the standard location. We have no business to start randomly requesting URIs, which may or may not be related to the feed.
Updated by Geoffrey Sneddon 875 days ago
The issues with IRIs and this, FWIW, is the lack of paying attention to the encoding of the HTML file and assuming it is a US-ASCII superset.
Updated by Geoffrey Sneddon 660 days ago
- Status changed from Unconfirmed to New
Marking as new on the condition this is a non-default option.
Updated by Geoffrey Sneddon 429 days ago
- Target version changed from 1.2 to 1.3