1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 12:21:45 +02:00

New e107::isCompatible() method added for checking plugins/themes are compatible with the current version of e107.

New parser method stripBlockTags($html) to remove p, div etc.
{CPAGEBODY: strip=blocks} shortcode option added (uses the method above)
This commit is contained in:
Cameron
2021-01-23 14:20:51 -08:00
parent 85ae08e8ff
commit 17a9aa2822
6 changed files with 138 additions and 4 deletions

View File

@@ -33,8 +33,34 @@
$this->tp->init();
}
public function testStripBlockTags()
{
$tests = array(
0 => array(
'text' => '<p>Paragraph 1</p><p><b>Paragraph 2<br >Line 3</b></p>',
'expected' => "Paragraph 1<b>Paragraph 2<br >Line 3</b>",
),
);
foreach($tests as $var)
{
$result = $this->tp->stripBlockTags($var['text']);
if(empty($var['expected']))
{
echo $result."\n\n";
continue;
}
$this->assertEquals($var['expected'], $result);
}
}
/*
public function testHtmlAbuseFilter()
{