mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/15442] Allow unsafe HTML in bbcode.html
PHPBB3-15442
This commit is contained in:
@@ -247,6 +247,22 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
|
||||
$this->assertSame($expected, $renderer->render($parser->parse($original)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @testdox Accepts unsafe default BBCodes
|
||||
*/
|
||||
public function test_unsafe_default_bbcodes()
|
||||
{
|
||||
$fixture = __DIR__ . '/fixtures/unsafe_default_bbcodes.xml';
|
||||
$style_dir = __DIR__ . '/fixtures/styles/';
|
||||
$container = $this->get_test_case_helpers()->set_s9e_services(null, $fixture, $style_dir);
|
||||
$parser = $container->get('text_formatter.parser');
|
||||
$renderer = $container->get('text_formatter.renderer');
|
||||
|
||||
$original = '[b]alert(1)[/b]';
|
||||
$expected = '<script>alert(1)</script>';
|
||||
$this->assertSame($expected, $renderer->render($parser->parse($original)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @testdox get_configurator() triggers events before and after configuration
|
||||
*/
|
||||
|
Reference in New Issue
Block a user