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:
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user