From 3bd6335fa6668c2c3cd01c7ef50341f4578e5cb5 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 29 May 2025 19:11:24 +0200 Subject: [PATCH] Add test --- tests/src/Content/Text/BBCodeTest.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index 9c61e10887..17f48ddae6 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -294,26 +294,31 @@ Karl Marx - Die ursprüngliche Akkumulation public function dataBBCodesToMarkdown() { return [ - 'bug-7808-gt' => [ + 'bug-7808-gt' => [ 'expected' => '>`>`', 'text' => '>[code]>[/code]', ], - 'bug-7808-lt' => [ + 'bug-7808-lt' => [ 'expected' => '<`<`', 'text' => '<[code]<[/code]', ], - 'bug-7808-amp' => [ + 'bug-7808-amp' => [ 'expected' => '&`&`', 'text' => '&[code]&[/code]', ], - 'bug-12701-quotes' => [ + 'bug-12701-quotes' => [ 'expected' => '[![abc"fgh](https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png)](https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581)', 'text' => '[url=https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581][img=https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png]abc"fgh[/img][/url]' ], - 'bug-12701-no-quotes' => [ + 'bug-12701-no-quotes' => [ 'expected' => '[![abcfgh](https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png "abcfgh")](https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581)', 'text' => '[url=https://domain.tld/photos/user/image/86912721086415cdc8e0a03226831581][img=https://domain.tld/photo/86912721086415cdc8e0a03226831581-1.png]abcfgh[/img][/url]' ], + /** @see https://github.com/friendica/friendica/pull/14908 */ + 'task-14908-strip-tags' => [ + 'expected' => 'Norddeutscher Bürger !\[Noddeutscher Bürger - Bismark Brötchen (Roger Cziwerny - pixapay)\](/rscamo/……)', + 'text' => '[class=postbox-ocean]Norddeutscher Bürger ![Noddeutscher Bürger - Bismark Brötchen (Roger Cziwerny - pixapay)](/rscamo/……)[/class]', + ], ]; }