Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: phpquery/phpquery
...
head fork: phpquery/phpquery
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 14, 2014
Shutko Vitaly sokal32 Update phpQueryObject.php
Fixed bug with cyrillic symbols in selectors
00d30fc
Commits on Apr 15, 2014
Shutko Vitaly sokal32 Update phpQueryObject.php
Added charset check to parseSelector
0018074
Commits on Jul 19, 2014
Fotis Alexandrou falexandrou Merge pull request #1 from sokal32/master
Update phpQueryObject.php
d4952ff
Showing with 3 additions and 2 deletions.
  1. +3 −2 phpQuery/phpQuery/phpQueryObject.php
5 phpQuery/phpQuery/phpQueryObject.php
View
@@ -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());

No commit comments for this range

Something went wrong with that request. Please try again.