Skip to content

Commit

Permalink
Correction of infinite recursion edge case in nested shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
maiorano84 committed Apr 23, 2015
1 parent 7ed1dce commit 27fcd3d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/ShortcodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public function testCustomShortcodeNoAttributes()
$this->assertEquals($manager->doShortcode('[ipsum]'), $manager['ipsum']->getIpsum());
}

/**
* @todo Look into possible infinite recursion on line 72
*/
public function testNestedShortcode()
{
$manager = new ShortcodeManager(array(
Expand All @@ -69,7 +66,7 @@ public function testNestedShortcode()

//Permissive
$this->assertEquals($manager->doShortcode('[foo][baz/][/foo]', 'foo|baz', true), 'foobaz');
//$this->assertNotEquals($manager->doShortcode('[foo][baz/][/foo]', 'foo', true), 'foobaz'); //Memory error
$this->assertEquals($manager->doShortcode('[foo][baz/][/foo]', 'foo', true), 'foo[baz/]');

//I DO WHAT I WANT
$this->assertEquals($manager->doShortcode('[foo][bar][baz/][/bar][/foo]', null, true), 'foobarbaz');
Expand Down

0 comments on commit 27fcd3d

Please sign in to comment.