[openstreetmap/openstreetmap-website] Parse og:image urls using Addressable::URI (PR #4891)

Anton Khorev notifications at github.com
Sat Jun 15 13:02:35 UTC 2024


Better fix:
- join urls with Addressable::URI - this one doesn't fail on urls with spaces
- normalize urls after that - replaces spaces with %20 in case open graph consumers wouldn't like them
- catch Addressable::URI::InvalidURIError and return the default image

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4891#issuecomment-2169546948
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4891/c2169546948 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240615/94fb74b3/attachment-0001.htm>


More information about the rails-dev mailing list