handle single quote with build-in way in getRegionObj

This commit is contained in:
Jeffrey Guo 2014-06-12 14:51:01 +12:00
parent 1af1620fb4
commit 27a381f4e0
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
*/
public function getRegionObj($region) {
// Try to find regions directly by CSS selector
$regionObj = $this->getSession()->getPage()->find('css', $region);
$regionObj = $this->getSession()->getPage()->find('css',
$this->getSession()->getSelectorsHandler()->xpathLiteral($region));
if($regionObj) {
return $regionObj;
}