Issues

ZF-8904: Zend_Dom_Query can't handle ID's starting with '__'

Description

When using Zend_Dom_Query::query with a query of the form '#__' it doesn't convert it to the correct Xpath query.

Comments

Have the same problem. The fix would be in Zend_Dom_Query_Css2Xpath::_tokenize():

Change $expression = preg_replace('|#([a-z][a-z0-9_-])|i', '[@id=\'$1\']', $expression); to $expression = preg_replace('|#([a-z_][a-z0-9_-])|i', '[@id=\'$1\']', $expression);