1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Issue #4346 Added TinyMce parser tests for script tags.

This commit is contained in:
Cameron 2021-01-18 08:11:49 -08:00
parent 419a0e727a
commit 80a4d547f6
2 changed files with 29 additions and 0 deletions

View File

@ -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'))

View File

@ -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);
}
}