Set page include limit to be 3 as expected instead of 4

This commit is contained in:
Dan Brown 2023-05-02 12:44:55 +01:00
parent 4bb2b31bc9
commit ce0b75294f
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 3 additions and 2 deletions

View File

@ -304,7 +304,7 @@ class PageContent
if ($blankIncludes) {
$content = $this->blankPageIncludes($content);
} else {
for ($includeDepth = 0; $includeDepth <= 3; $includeDepth++) {
for ($includeDepth = 0; $includeDepth < 3; $includeDepth++) {
$content = $this->parsePageIncludes($content);
}
}

View File

@ -116,7 +116,8 @@ class PageContentTest extends TestCase
$page->save();
$pageResp = $this->asEditor()->get($page->getUrl());
$this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry ' . $tag);
$this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
$this->withHtml($pageResp)->assertElementNotContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
}
public function test_page_content_scripts_removed_by_default()