@@ -33,6 +33,8 @@ public function provideShortcodes()
3333 array ('[sc x="multi ' ."\n" .'line"] ' , 'sc ' , array ('x ' => 'multi ' ."\n" .'line ' ), null ),
3434 array ('[sc noval x="val" y]content[/sc] ' , 'sc ' , array ('noval ' => null , 'x ' => 'val ' , 'y ' => null ), 'content ' ),
3535 array ('[sc x="{..}"] ' , 'sc ' , array ('x ' => '{..} ' ), null ),
36+ array ('[sc a="x y" b="x" c=""] ' , 'sc ' , array ('a ' => 'x y ' , 'b ' => 'x ' , 'c ' => '' ), null ),
37+ array ('[sc a="a \"\" b"] ' , 'sc ' , array ('a ' => 'a \"\" b ' ), null ),
3638 );
3739 }
3840
@@ -53,4 +55,14 @@ public function testWithDifferentSyntax()
5355 $ this ->assertSame ('val oth ' , $ shortcode ->getParameter ('arg ' ));
5456 $ this ->assertSame ('cont ' , $ shortcode ->getContent ());
5557 }
58+
59+ public function testDifferentSyntaxEscapedQuotes ()
60+ {
61+ $ parser = new Parser (new Syntax ('^ ' , '$ ' , '& ' , '!!! ' , '@@ ' ));
62+ $ shortcode = $ parser ->parse ('^code a!!!@@\"\"@@ b!!!@@x\"y@@ c$cnt^&code$ ' );
63+
64+ $ this ->assertSame ('code ' , $ shortcode ->getName ());
65+ $ this ->assertSame (array ('a ' => '\\" \\" ' , 'b ' => 'x\"y ' , 'c ' => null ), $ shortcode ->getParameters ());
66+ $ this ->assertSame ('cnt ' , $ shortcode ->getContent ());
67+ }
5668 }
0 commit comments