Skip to content
Browse files

Merge pull request #1 from sokal32/master

Update phpQueryObject.php
  • Loading branch information...
2 parents e17f7cd + 0018074 commit d4952ffd13c177b14a0a9a5d58ccd71a2a56c284 @falexandrou falexandrou committed Jul 19, 2014
Showing with 3 additions and 2 deletions.
  1. +3 −2 phpQuery/phpQuery/phpQueryObject.php
View
5 phpQuery/phpQuery/phpQueryObject.php
@@ -311,9 +311,10 @@ protected function isChar($char) {
protected function parseSelector($query) {
// clean spaces
// TODO include this inside parsing ?
+ $modifier = strtolower(str_replace('-', '', $this->charset)) == 'utf8' ? 'u' : '';
$query = trim(
- preg_replace('@\s+@', ' ',
- preg_replace('@\s*(>|\\+|~)\s*@', '\\1', $query)
+ preg_replace('@\s+@' . $modifier, ' ',
+ preg_replace('@\s*(>|\\+|~)\s*@' . $modifier, '\\1', $query)
)
);
$queries = array(array());

0 comments on commit d4952ff

Please sign in to comment.
Something went wrong with that request. Please try again.