ivopetkov / html5-dom-document-php

A better HTML5 parser for PHP.
MIT License
599 stars 40 forks source link

Unsupported selector in version 2.2.3 #34

Closed mattiaz9 closed 4 years ago

mattiaz9 commented 4 years ago

I get this error after the last release (2.2.3): "Unsupported selector (#productDescription)" on line 510 of vendor/ivopetkov/html5-dom-document-php/src/HTML5DOMDocument/Internal/QuerySelectors.php

Error I don't get after changing the line 229 of QuerySelectors.php to the previous pattern: $simpleSelectors['(?:[a-z0-9\-]*)#(?:.+)'] = ...

This error also appears to occur only with selectors containing uppercase characters.

ivopetkov commented 4 years ago

Thanks for pointing this out. Case sensitivity for all selectors was not handled correctly at all. This is now fixed in v2.2.4. Could you please confirm its working for you too.

mattiaz9 commented 4 years ago

Yes I can confirm it works now.