Closed yurikoval closed 6 years ago
Some html content gets misinterpreted as URL, which causes Addressable::URI::InvalidURIError. To prevent this error, we can check for a valid schema and host set in src before we attempt to fetch the URL.
Addressable::URI::InvalidURIError
src
Sample HTML:
<!DOCTYPE html> <html> <head> <meta name="twitter:title" property="og:title" itemprop="title name" content="OpenGraph Title" /> <meta property="og:url" content="https://www.example.com/page.html" /> </head> </html>
Closing in favor of https://github.com/mobomo/opengraph
Some html content gets misinterpreted as URL, which causes
Addressable::URI::InvalidURIError
. To prevent this error, we can check for a valid schema and host set insrc
before we attempt to fetch the URL.Sample HTML: