Closed srijan-kapoor closed 1 year ago
Thanks for reporting this issue. It was interesting to find out why this is popping up. I've found some explanations here https://docs.knapsackpro.com/2020/uri-escape-is-obsolete-percent-encoding-your-query-string
I'll see what I can do on the image_info gem.
Yeah that's the only helpful explanation I came across when I looked it up.
Thank you for considering it.
I have tried to percent-encode my query string - to escape these warnings - and pass it as
query_url = https%3A%2F%2Ft.co%2FMnKEe0XpsY
LinkThumbnailer.generate(query_url)
but I see this returned
Rescued: LinkThumbnailer::BadUriFormat
Just curious if it doesn't support the encoded url string or if I'm missing something here. Thanks!
The gem will attempt to parse the given url using the following code:
::URI.parse(url.to_s)
and consider valid url if url.is_a?(::URI::HTTP)
Looks like it's fixed on latest image info gem version
.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/image_info-1.2.0/lib/image_info/image.rb:10: warning: URI.escape is obsolete
I'm seeing this warning each time I trigger the
link-thumbnailer
. Any ideas on how this can be fixed or suppressed?