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

WordPress detection incorrect? #280

Closed
irfancharania opened this issue Feb 15, 2019 · 2 comments
Closed

WordPress detection incorrect? #280

irfancharania opened this issue Feb 15, 2019 · 2 comments

Comments

@irfancharania
Copy link

Hi!

Thanks for open-sourcing this project.

I was looking through the code and came across this line

https://github.com/postlight/mercury-parser/blob/15f7fa1e27fe6b47c87da40ba4fce9b2db7934ec/src/utils/dom/constants.js#L304

I think this XPath should be
meta[name=generator][content^=WordPress]

Check with examples:

The fixtures for these sites should be updated

@benubois
Copy link
Contributor

Hi @irfancharania,

I believe the code and tests are correct. The reason why this works is because mercury is normalizing all meta tags. This way they can be queried with the same selector.

@irfancharania
Copy link
Author

That makes sense then! Thanks for clarifying

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