ash-jc-allen / favicon-fetcher

A Laravel package for fetching favicons from websites.
MIT License
167 stars 13 forks source link

Allow element attributes in single quotes #20

Closed marispro closed 1 year ago

marispro commented 1 year ago

This fix tries to fetch favicon when icon href is using single quotes instead of double.

Example: <link href='https://www.1a.lv/assets/themes/1a/favicon-c97bcf2fe300f089a14f027f6302d7d1bf0767561b811612e375f48dccdff6d0.ico' rel='shortcut icon' type='image/x-icon'>

ash-jc-allen commented 1 year ago

Hey @marispro, thanks for this PR!

It looks like these changes might be breaking the existing functionality. Please could you also add your example from above to the test data provider (https://github.com/ash-jc-allen/favicon-fetcher/blob/master/tests/Feature/Drivers/HttpDriverTest.php) too? 😄

marispro commented 1 year ago

@ash-jc-allen yes, seems there are some errors in tests. My PR was just a quick solution and not the best one. :)

ash-jc-allen commented 1 year ago

Hey @marispro! Sorry for taking a while to get back to you on this one. I've just made some small updates to your code to get it working.

Would you maybe be able to test out the changes and see if they'd solve your issue?

If so, I'll get this merged and released 🙂

marispro commented 1 year ago

Hello @ash-jc-allen,

All works good and favicon is fetched correctly. Looks good to be merged :) Thank you!

ash-jc-allen commented 1 year ago

Hey @marispro!

Perfect! I'll get this merged and released today 😄

ash-jc-allen commented 1 year ago

This has now been released as part of v1.2.1 (https://github.com/ash-jc-allen/favicon-fetcher/releases/tag/v1.2.1)