From 5813b5fbee2ac332f14dee2da7df9c3dfd6c2719 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Mon, 9 Dec 2019 18:06:30 +0100 Subject: [ticket/16252] Ignore non-BBCodes when looking for unauthorized markup PHPBB3-16252 --- .../tickets_data/PHPBB3-16252.after.php | 18 ++++++++++++++++++ .../tickets_data/PHPBB3-16252.before.php | 17 +++++++++++++++++ tests/text_processing/tickets_data/PHPBB3-16252.html | 1 + tests/text_processing/tickets_data/PHPBB3-16252.txt | 1 + 4 files changed, 37 insertions(+) create mode 100644 tests/text_processing/tickets_data/PHPBB3-16252.after.php create mode 100644 tests/text_processing/tickets_data/PHPBB3-16252.before.php create mode 100644 tests/text_processing/tickets_data/PHPBB3-16252.html create mode 100644 tests/text_processing/tickets_data/PHPBB3-16252.txt (limited to 'tests') diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.after.php b/tests/text_processing/tickets_data/PHPBB3-16252.after.php new file mode 100644 index 0000000000..c2f57c171e --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-16252.after.php @@ -0,0 +1,18 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +function after_assert_phpbb3_16252($vars) +{ + extract($vars); + $test->assertEmpty($parser->get_errors()); +} diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.before.php b/tests/text_processing/tickets_data/PHPBB3-16252.before.php new file mode 100644 index 0000000000..94c59d9602 --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-16252.before.php @@ -0,0 +1,17 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +function before_assert_phpbb3_16252($vars) +{ + $vars['parser']->disable_bbcode('url'); +} diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.html b/tests/text_processing/tickets_data/PHPBB3-16252.html new file mode 100644 index 0000000000..5b14ab0e7a --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-16252.html @@ -0,0 +1 @@ +http://localhost/ \ No newline at end of file diff --git a/tests/text_processing/tickets_data/PHPBB3-16252.txt b/tests/text_processing/tickets_data/PHPBB3-16252.txt new file mode 100644 index 0000000000..5b14ab0e7a --- /dev/null +++ b/tests/text_processing/tickets_data/PHPBB3-16252.txt @@ -0,0 +1 @@ +http://localhost/ \ No newline at end of file -- cgit v1.2.1