Skip to content

Commit b3f8168

Browse files
committed
small fix for css to xpath cache
1 parent 7cdf3c8 commit b3f8168

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rct567/DomQuery/DomQuery.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,11 +1286,11 @@ public static function cssToXpath(string $path)
12861286

12871287
// replace spaces inside (), to correctly create tokens (restore later)
12881288

1289-
$path = self::replaceCharInsideEnclosure($path, ' ');
1289+
$path_escaped = self::replaceCharInsideEnclosure($path, ' ');
12901290

12911291
// create tokens and analyze to create segments
12921292

1293-
$tokens = preg_split('/\s+/', $path);
1293+
$tokens = preg_split('/\s+/', $path_escaped);
12941294

12951295
$segments = array();
12961296

0 commit comments

Comments
 (0)