Skip to content
This repository
Browse code

Fix regex match when regex included meta characters

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
commit 23f1c8e1c70f84cdeef9adbdec1901cf0e598168 1 parent 4496a0a
authored August 30, 2010 markstory committed October 24, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  cake/libs/set.php
2  cake/libs/set.php
@@ -393,7 +393,7 @@ function extract($path, $data = null, $options = array()) {
393 393
 				$contexts = array($data);
394 394
 			}
395 395
 		}
396  
-		$tokens = array_slice(preg_split('/(?<!=)\/(?![a-z-\s]*\])/', $path), 1);
  396
+		$tokens = array_slice(preg_split('/(?<!=|\\\\)\/(?![a-z-\s]*\])/', $path), 1);
397 397
 
398 398
 		do {
399 399
 			$token = array_shift($tokens);

0 notes on commit 23f1c8e

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