Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch correct best title from URL with double quotes characters title #262

Closed
gizipp opened this issue May 7, 2020 · 1 comment

Comments

@gizipp
Copy link

gizipp commented May 7, 2020

Hello, @jaimeiniesta

The URL below has quotation marks in the title, thus the value of meta twitter:title seems incorrect.

URL : https://cobwwweb.com/add-reload-method-to-ruby-console
Title : Add a "reload!" Method to your Ruby Console
Best Title: Add a

Checked using web also failed https://metainspectordemo.herokuapp.com/scrape?url=https%3A%2F%2Fcobwwweb.com%2Fadd-reload-method-to-ruby-console

Cannot tell if is bug from MetaInspector or Nokogiri.

@jschwindt
Copy link
Contributor

@gizipp The problem is that the HTML es malformed because the quotes must be escaped and in this case they aren’t:

<meta name="twitter:title" content="Add a "reload!" Method to your Ruby Console">

The HTML should be this way:

<meta name="twitter:title" content="Add a &quot;reload!&quot; Method to your Ruby Console">

Check this: https://validator.w3.org/nu/?doc=https%3A%2F%2Fcobwwweb.com%2Fadd-reload-method-to-ruby-console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants