This is apparently a problem with the implementation of the Zend css style query. In Zend / Dom / Query.php, the query function calls the conversion function to convert the query to the correct xpath format:
public function query($query)
{
$xpathQuery = Zend_Dom_Query_Css2Xpath::transform($query);
return $this->queryXpath($xpathQuery, $query);
}
However, in the method, transform()they seem to use some pretty basic regular expression to separate the string with spaces:
$segments = preg_split('/\s+/', $path);
This basically means that your request link[rel="shortcut icon"]now becomes two requests: link[rel="shortcutandicon"]
, Zend_Dom_Query::queryXpath() xPath. :
$dom->queryXpath('//link[@rel="shortcut icon"]');