mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01:00
[ticket/11250] Move quote special cases from class to unit tests
PHPBB3-11250
This commit is contained in:
parent
754dc9c159
commit
ade9f831aa
@ -702,17 +702,6 @@ class bbcode_firstpass extends bbcode
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
/**
|
||||
* If you change this code, make sure the cases described within the following reports are still working:
|
||||
* #3572 - [quote="[test]test"]test [ test[/quote] - (correct: parsed)
|
||||
* #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
|
||||
* #14770 - [quote="["]test[/quote] (correct: parsed)
|
||||
* [quote="[i]test[/i]"]test[/quote] (correct: parsed)
|
||||
* [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
|
||||
* #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
|
||||
* #40565 - [quote="a"]a[/quote][quote="a]a[/quote] (correct: first quote tag parsed, second quote tag unparsed)
|
||||
*/
|
||||
|
||||
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
|
||||
|
||||
if (!$in)
|
||||
|
@ -137,6 +137,32 @@ class phpbb_bbcode_parser_test extends PHPUnit_Framework_TestCase
|
||||
'[email=bbcode-test@phpbb.com]Email[/email]',
|
||||
'[email=bbcode-test@phpbb.com:]Email[/email:]',
|
||||
),
|
||||
|
||||
array(
|
||||
'PHPBB3-1401 - correct: parsed',
|
||||
'[quote="[test]test"]test [ test[/quote]',
|
||||
'[quote="[test]test":]test [ test[/quote:]',
|
||||
),
|
||||
array(
|
||||
'PHPBB3-6117 - correct: parsed',
|
||||
'[quote]test[/quote] test ] and [ test [quote]test[/quote]',
|
||||
'[quote:]test[/quote:] test ] and [ test [quote:]test[/quote:]',
|
||||
),
|
||||
array(
|
||||
'PHPBB3-6200 - correct: parsed',
|
||||
'[quote="["]test[/quote]',
|
||||
'[quote="[":]test[/quote:]',
|
||||
),
|
||||
array(
|
||||
'PHPBB3-9364 - quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted',
|
||||
'[quote]test[/[/b]quote] test [/quote][/quote] test',
|
||||
'[quote:]test[/[/b]quote] test [/quote:][/quote] test',
|
||||
),
|
||||
array(
|
||||
'PHPBB3-8096 - first quote tag parsed, second quote tag unparsed',
|
||||
'[quote="a"]a[/quote][quote="a]a[/quote]',
|
||||
'[quote="a":]a[/quote:][quote="a]a[/quote]',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user