mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Issue #4346 Added TinyMce parser tests for script tags.
This commit is contained in:
parent
419a0e727a
commit
80a4d547f6
@ -18,6 +18,7 @@ $_E107['no_online'] = true;
|
||||
$_E107['no_menus'] = true;
|
||||
$_E107['no_forceuserupdate'] = true;
|
||||
$_E107['no_maintenance'] = true;
|
||||
$_E107['minimal'] = true;
|
||||
|
||||
if (!defined('e_ADMIN_AREA')) define('e_ADMIN_AREA', true);
|
||||
if(!defined('TINYMCE_DEBUG') && !defined('TINYMCE_UNIT_TEST'))
|
||||
|
@ -73,6 +73,9 @@ Plain text paragraph 3<br />';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test parsing of input from user via TinyMce.
|
||||
*/
|
||||
public function testToBBcode()
|
||||
{
|
||||
|
||||
@ -117,7 +120,32 @@ Plain text paragraph 3<br />';
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function testParsingOfScriptTags()
|
||||
{
|
||||
|
||||
// test parsing of scripts.
|
||||
|
||||
$string = '<p><script type="text/javascript" src="https://cdn.myscript.net/js/1.js" async></script></p>';
|
||||
$result = $this->tm->toBBcode($string);
|
||||
$this->assertSame('[html]'.$string.'[/html]', $result);
|
||||
|
||||
|
||||
$result = $this->tm->toHTML($string);
|
||||
$this->assertSame($string, $result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user