1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/10620] Removed extraneous quotes from attribute values

PHPBB3-10620
This commit is contained in:
JoshyPHP
2015-06-24 22:20:39 +02:00
parent 129b3375ae
commit 4f1b25706f
6 changed files with 41 additions and 25 deletions

View File

@@ -218,7 +218,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
'<blockquote><div><cite><a href="http://example.org" class="postlink">http://example.org</a> wrote:</cite>...</div></blockquote>'
),
array(
'[quote="http://example.org"]...[/quote]',
'[quote=http://example.org]...[/quote]',
'<blockquote><div><cite><a href="http://example.org" class="postlink">http://example.org</a> wrote:</cite>...</div></blockquote>'
),
array(
@@ -226,7 +226,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
"<blockquote class=\"uncited\"><div>\nThis is a long quote that is definitely going to exceed 80 characters\n</div></blockquote>\n\nFollowed by a reply"
),
array(
'[quote="Username" post_id="123"]...[/quote]',
'[quote=Username post_id=123]...[/quote]',
'<blockquote><div><cite>Username wrote: <a href="phpBB/viewtopic.php?p=123#p123" data-post-id="123" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a></cite>...</div></blockquote>'
),
array(
@@ -235,16 +235,16 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
'<blockquote><div><cite>Username wrote:</cite>...</div></blockquote>'
),
array(
'[quote="Username" time="58705871"]...[/quote]',
'[quote=Username time=58705871]...[/quote]',
'<blockquote><div><cite>1971-11-11 11:11:11 Username wrote:</cite>...</div></blockquote>'
),
array(
'[quote="Username" user_id="123"]...[/quote]',
'[quote=Username user_id=123]...[/quote]',
'<blockquote><div><cite><a href="phpBB/memberlist.php?mode=viewprofile&amp;u=123">Username</a> wrote:</cite>...</div></blockquote>'
),
array(
// Users are not allowed to submit their own URL for the profile
'[quote="Username" profile_url="http://fake.example.org"]...[/quote]',
'[quote=Username profile_url=http://fake.example.org]...[/quote]',
'<blockquote><div><cite>Username wrote:</cite>...</div></blockquote>'
),
);

View File

@@ -98,11 +98,15 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case
array('foo')
),
array(
'[quote="foo"]..[/quote] [quote="bar"]..[/quote]',
'[quote=foo]..[/quote] [quote]..[/quote]',
array('foo')
),
array(
'[quote=foo]..[/quote] [quote=bar]..[/quote]',
array('foo', 'bar')
),
array(
'[quote="foo"].[quote="baz"]..[/quote].[/quote] [quote="bar"]..[/quote]',
'[quote=foo].[quote=baz]..[/quote].[/quote] [quote=bar]..[/quote]',
array('foo', 'bar')
),
);
@@ -169,7 +173,7 @@ class phpbb_textformatter_s9e_utils_test extends phpbb_test_case
'post_id' => 123,
'url' => 'http://example.org'
),
'[quote="user" post_id="123" url="http://example.org"]...[/quote]',
'[quote=user post_id=123 url=http://example.org]...[/quote]',
),
array(
'This is a long quote that is definitely going to exceed 80 characters',