mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 18:41:52 +02:00
[ticket/16574] Remove flash BBcode
PHPBB3-16574
This commit is contained in:
committed by
Marc Alexander
parent
d714c6db19
commit
28f98402f3
@@ -211,11 +211,6 @@ class phpbb_bbcode_parser_test extends \phpbb_test_case
|
||||
'[quote="[img]https://area51.phpbb.com/images/area51.png[/img]"]test[/quote]',
|
||||
'[quote="[img:]https://area51.phpbb.com/images/area51.png[/img:]":]test[/quote:]',
|
||||
),
|
||||
array(
|
||||
'Disallow flash bbcodes in usernames - Username displayed as [flash]http://www.phpbb.com/[/flash]',
|
||||
'[quote="[flash]http://www.phpbb.com/[/flash]"]test[/quote]',
|
||||
'[quote="[flash]http://www.phpbb.com/[/flash]":]test[/quote:]',
|
||||
),
|
||||
array(
|
||||
'Disallow quote bbcodes in usernames - Username displayed as [quote]test[/quote]',
|
||||
'[quote="[quote]test[/quote]"]test[/quote]',
|
||||
|
@@ -582,7 +582,6 @@ class phpbb_test_case_helpers
|
||||
|
||||
$user->date_format = 'Y-m-d H:i:s';
|
||||
$user->optionset('viewcensors', true);
|
||||
$user->optionset('viewflash', true);
|
||||
$user->optionset('viewimg', true);
|
||||
$user->optionset('viewsmilies', true);
|
||||
$user->timezone = new \DateTimeZone('UTC');
|
||||
|
@@ -87,7 +87,6 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
|
||||
$this->assertTrue(isset($configurator->BBCodes['CODE']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['COLOR']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['EMAIL']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['FLASH']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['I']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['IMG']));
|
||||
$this->assertTrue(isset($configurator->BBCodes['LIST']));
|
||||
|
@@ -36,5 +36,3 @@
|
||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||
|
||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||
|
||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
||||
|
@@ -36,5 +36,3 @@
|
||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||
|
||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||
|
||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
||||
|
@@ -36,5 +36,3 @@
|
||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||
|
||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||
|
||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
||||
|
@@ -74,5 +74,3 @@
|
||||
{% for url in loops.url %}<a href="{{ URL }}" class="postlink">{{ DESCRIPTION }}</a>{% endfor %}
|
||||
|
||||
{% for email in loops.email %}<a href="mailto:{{ EMAIL }}">{{ DESCRIPTION }}</a>{% endfor %}
|
||||
|
||||
{% for flash in loops.flash %}<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{{ WIDTH }}" height="{{ HEIGHT }}"><param name="movie" value="{{ URL }}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{{ URL }}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{{ WIDTH }}" height="{{ HEIGHT }}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object>{% endfor %}
|
||||
|
@@ -36,5 +36,3 @@
|
||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||
|
||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||
|
||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
||||
|
@@ -106,11 +106,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||
'apple',
|
||||
array('set_viewcensors' => false)
|
||||
),
|
||||
array(
|
||||
'<r><FLASH height="456" url="http://example.org/foo.swf" width="123"><s>[flash=123,456]</s><URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL><e>[/flash]</e></FLASH></r>',
|
||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://example.org/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://example.org/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>',
|
||||
array('set_viewflash' => true)
|
||||
),
|
||||
array(
|
||||
'<r><IMG src="http://example.org/foo.png"><s>[img]</s>http://example.org/foo.png<e>[/img]</e></IMG></r>',
|
||||
'<img src="http://example.org/foo.png" class="postimage" alt="Image">',
|
||||
@@ -214,26 +209,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||
$phpbb_container->set('auth', $auth);
|
||||
}
|
||||
),
|
||||
array(
|
||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://localhost/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://localhost/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>'
|
||||
),
|
||||
array(
|
||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
||||
'http://localhost/foo.swf',
|
||||
function ($phpbb_container)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
||||
$lang = new \phpbb\language\language($lang_loader);
|
||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
$user->data['user_options'] = 230271;
|
||||
$user->optionset('viewflash', false);
|
||||
|
||||
$phpbb_container->set('user', $user);
|
||||
}
|
||||
),
|
||||
array(
|
||||
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
||||
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
||||
@@ -307,7 +282,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||
{
|
||||
return array(
|
||||
array('viewcensors'),
|
||||
array('viewflash'),
|
||||
array('viewimg'),
|
||||
array('viewsmilies')
|
||||
);
|
||||
|
@@ -39,7 +39,6 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
$user->data['user_options'] = 230271;
|
||||
$user->optionset('viewcensors', true);
|
||||
$user->optionset('viewflash', true);
|
||||
$user->optionset('viewimg', true);
|
||||
$user->optionset('viewsmilies', true);
|
||||
|
||||
@@ -159,27 +158,6 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||
'apple',
|
||||
false
|
||||
),
|
||||
array(
|
||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://localhost/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://localhost/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>'
|
||||
),
|
||||
array(
|
||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
||||
'http://localhost/foo.swf',
|
||||
true,
|
||||
function ($phpbb_container)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
||||
$lang = new \phpbb\language\language($lang_loader);
|
||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||
$user->data['user_options'] = 230271;
|
||||
$user->optionset('viewflash', false);
|
||||
|
||||
$phpbb_container->set('user', $user);
|
||||
}
|
||||
),
|
||||
array(
|
||||
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
||||
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
||||
|
@@ -32,7 +32,7 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
/**
|
||||
* @dataProvider get_text_formatter_tests
|
||||
*/
|
||||
public function test_text_formatter($original, $expected, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode, $setup = null)
|
||||
public function test_text_formatter($original, $expected, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_quote_bbcode, $allow_url_bbcode, $setup = null)
|
||||
{
|
||||
$actual = $original;
|
||||
$uid = '';
|
||||
@@ -44,7 +44,7 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
$setup();
|
||||
}
|
||||
|
||||
generate_text_for_storage($actual, $uid, $bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode);
|
||||
generate_text_for_storage($actual, $uid, $bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_quote_bbcode, $allow_url_bbcode);
|
||||
|
||||
$this->assertSame($expected, $actual);
|
||||
}
|
||||
@@ -61,7 +61,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
array(
|
||||
'Hello [url=http://example.org]world[/url] :)',
|
||||
@@ -72,7 +71,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
array(
|
||||
'&<>"\'',
|
||||
@@ -83,7 +81,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
array(
|
||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||
@@ -94,7 +91,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
array(
|
||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||
@@ -105,7 +101,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
array(
|
||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||
@@ -115,7 +110,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
array(
|
||||
@@ -127,7 +121,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
array(
|
||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||
@@ -138,16 +131,14 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
array(
|
||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||
'<r><B><s>[b]</s>..<e>[/b]</e></B> http://example.org :) [img]http://example.org/img.png[/img] <FLASH height="123" url="http://example.org/flash.swf" width="123"><s>[flash=123,123]</s>http://example.org/flash.swf<e>[/flash]</e></FLASH> [quote]...[/quote] [url]http://example.org[/url]</r>',
|
||||
'<r><B><s>[b]</s>..<e>[/b]</e></B> http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]</r>',
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
@@ -158,7 +149,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
@@ -170,7 +160,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
);
|
||||
|
@@ -38,15 +38,12 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
$config = new \phpbb\config\config(array('max_poll_options' => 999));
|
||||
|
||||
$map = array(
|
||||
array('MAX_FLASH_HEIGHT_EXCEEDED', 123, 'Your flash files may only be up to 123 pixels high.'),
|
||||
array('MAX_FLASH_WIDTH_EXCEEDED', 456, 'Your flash files may only be up to 456 pixels wide.'),
|
||||
array('MAX_FONT_SIZE_EXCEEDED', 120, 'You may only use fonts up to size 120.'),
|
||||
array('MAX_FONT_SIZE_EXCEEDED', 200, 'You may only use fonts up to size 200.'),
|
||||
array('MAX_IMG_HEIGHT_EXCEEDED', 12, 'Your images may only be up to 12 pixels high.'),
|
||||
array('MAX_IMG_WIDTH_EXCEEDED', 34, 'Your images may only be up to 34 pixels wide.'),
|
||||
array('TOO_MANY_SMILIES', 3, 'Your message contains too many smilies. The maximum number of smilies allowed is 3.'),
|
||||
array('TOO_MANY_URLS', 2, 'Your message contains too many URLs. The maximum number of URLs allowed is 2.'),
|
||||
array('UNAUTHORISED_BBCODE', '[flash]', 'You cannot use certain BBCodes: [flash].'),
|
||||
array('UNAUTHORISED_BBCODE', '[img]', 'You cannot use certain BBCodes: [img].'),
|
||||
array('UNAUTHORISED_BBCODE', '[quote]', 'You cannot use certain BBCodes: [quote].'),
|
||||
array('UNAUTHORISED_BBCODE', '[url]', 'You cannot use certain BBCodes: [url].'),
|
||||
@@ -112,7 +109,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
|
||||
$this->assertSame(
|
||||
'<r>Me<I><s>[i]</s>s<e>[/i]</e></I>sage</r>',
|
||||
$message_parser->parse(true, true, true, true, true, true, true, false)
|
||||
$message_parser->parse(true, true, true, true, true, true, false)
|
||||
);
|
||||
|
||||
$this->assertSame($warn_msg, $message_parser->warn_msg);
|
||||
@@ -155,23 +152,6 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
),
|
||||
array('You cannot use certain BBCodes: [quote].')
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'poll_title' => 'xxx',
|
||||
'poll_option_text' => "[flash=12,34]http://example.org/x.swf[/flash]\n:)",
|
||||
'poll_max_options' => 2,
|
||||
'poll_options_size' => 2
|
||||
),
|
||||
array(
|
||||
'poll_title' => '<t>xxx</t>',
|
||||
'poll_option_text' => "<t>[flash=12,34]http://example.org/x.swf[/flash]</t>\n<r><E>:)</E></r>",
|
||||
'poll_options' => array(
|
||||
'<t>[flash=12,34]http://example.org/x.swf[/flash]</t>',
|
||||
'<r><E>:)</E></r>'
|
||||
)
|
||||
),
|
||||
array('You cannot use certain BBCodes: [flash].')
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'poll_title' => 'xxx',
|
||||
@@ -211,85 +191,78 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[b]bold[/b]',
|
||||
'<r><B><s>[b]</s>bold<e>[/b]</e></B></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[b]bold[/b]',
|
||||
'<t>[b]bold[/b]</t>',
|
||||
array(false, true, true, true, true, true, true)
|
||||
array(false, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'http://example.org',
|
||||
'<r><URL url="http://example.org">http://example.org</URL></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'http://example.org',
|
||||
'<t>http://example.org</t>',
|
||||
array(true, false, true, true, true, true, true)
|
||||
array(true, false, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
':)',
|
||||
'<r><E>:)</E></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
':)',
|
||||
'<t>:)</t>',
|
||||
array(true, true, false, true, true, true, true)
|
||||
array(true, true, false, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s>[img]http://example.org/img.png[/img]<e>[/url]</e></URL></r>',
|
||||
array(true, true, true, false, true, true, true),
|
||||
array(true, true, true, false, true, true),
|
||||
null,
|
||||
array('You cannot use certain BBCodes: [img].')
|
||||
),
|
||||
array(
|
||||
'[flash=12,34]http://example.org/foo.swf[/flash]',
|
||||
'<r><FLASH height="34" url="http://example.org/foo.swf" width="12"><s>[flash=12,34]</s><URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL><e>[/flash]</e></FLASH></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[flash=12,34]http://example.org/foo.swf[/flash]',
|
||||
'<r>[flash=12,34]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
||||
array(true, true, true, true, false, true, true),
|
||||
null,
|
||||
array('You cannot use certain BBCodes: [flash].')
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[quote="foo"]bar :)[/quote]',
|
||||
'<r><QUOTE author="foo"><s>[quote="foo"]</s>bar <E>:)</E><e>[/quote]</e></QUOTE></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[quote="foo"]bar :)[/quote]',
|
||||
'<r>[quote="foo"]bar <E>:)</E>[/quote]</r>',
|
||||
array(true, true, true, true, true, false, true),
|
||||
array(true, true, true, true, false, true),
|
||||
null,
|
||||
array('You cannot use certain BBCodes: [quote].')
|
||||
),
|
||||
array(
|
||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
||||
array(true, true, true, true, true, true, true)
|
||||
array(true, true, true, true, true, true)
|
||||
),
|
||||
array(
|
||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||
'<r>[url=http://example.org]<IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG>[/url]</r>',
|
||||
array(true, true, true, true, true, true, false),
|
||||
array(true, true, true, true, true, false),
|
||||
null,
|
||||
array('You cannot use certain BBCodes: [url].')
|
||||
),
|
||||
array(
|
||||
'[size=200]200[/size]',
|
||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||
@@ -298,7 +271,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[size=200]200[/size]',
|
||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_font_size', 0);
|
||||
@@ -307,7 +280,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[size=2000]2000[/size]',
|
||||
'<t>[size=2000]2000[/size]</t>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||
@@ -317,7 +290,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[size=0]0[/size]',
|
||||
'<t>[size=0]0[/size]</t>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||
@@ -326,7 +299,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[size=200]200[/size]',
|
||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_font_size', 200);
|
||||
@@ -335,7 +308,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[size=200]200[/size]',
|
||||
'<t>[size=200]200[/size]</t>',
|
||||
array(true, true, true, true, true, true, true, true, 'sig'),
|
||||
array(true, true, true, true, true, true, true, 'sig'),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_font_size', 120);
|
||||
@@ -345,7 +318,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[img]http://example.org/100x100.png[/img]',
|
||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_img_height', 0);
|
||||
@@ -355,7 +328,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[img]http://example.org/100x100.png[/img]',
|
||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_img_height', 100);
|
||||
@@ -365,37 +338,17 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'[img]http://example.org/100x100.png[/img]',
|
||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_img_height', 12);
|
||||
$phpbb_container->get('config')->set('max_sig_img_width', 34);
|
||||
}
|
||||
),
|
||||
array(
|
||||
'[flash=999,999]http://example.org/foo.swf[/flash]',
|
||||
'<r>[flash=999,999]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_img_height', 123);
|
||||
},
|
||||
array('Your flash files may only be up to 123 pixels high.')
|
||||
),
|
||||
array(
|
||||
'[flash=999,999]http://example.org/foo.swf[/flash]',
|
||||
'<r>[flash=999,999]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_img_width', 456);
|
||||
},
|
||||
array('Your flash files may only be up to 456 pixels wide.')
|
||||
),
|
||||
array(
|
||||
':) :) :)',
|
||||
'<r><E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
||||
@@ -404,7 +357,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
':) :) :) :)',
|
||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
||||
@@ -414,7 +367,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
':) :) :) :)',
|
||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_smilies', 0);
|
||||
@@ -423,7 +376,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
':) :) :) :)',
|
||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
||||
@@ -432,7 +385,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
':) :) :) :)',
|
||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
||||
array(true, true, true, true, true, true, true, true, 'sig'),
|
||||
array(true, true, true, true, true, true, true, 'sig'),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
||||
@@ -442,7 +395,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'http://example.org http://example.org http://example.org',
|
||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> http://example.org</r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_urls', 2);
|
||||
@@ -452,7 +405,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'http://example.org http://example.org http://example.org',
|
||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_post_urls', 0);
|
||||
@@ -461,7 +414,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||
array(
|
||||
'http://example.org http://example.org http://example.org',
|
||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
||||
array(true, true, true, true, true, true, true, true),
|
||||
array(true, true, true, true, true, true, true),
|
||||
function ($phpbb_container)
|
||||
{
|
||||
$phpbb_container->get('config')->set('max_sig_urls', 2);
|
||||
|
@@ -117,20 +117,6 @@ abstract class phpbb_textreparser_test_row_based_plugin extends phpbb_database_t
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
6,
|
||||
7,
|
||||
array(
|
||||
array(
|
||||
'id' => '6',
|
||||
'text' => '<r><FLASH height="345" url="http://example.org/flash.swf" width="123"><s>[flash=123,345]</s>http://example.org/flash.swf<e>[/flash]</e></FLASH></r>',
|
||||
),
|
||||
array(
|
||||
'id' => '7',
|
||||
'text' => '<t>[flash=123,345]http://example.org/flash.swf[/flash]</t>',
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
8,
|
||||
9,
|
||||
|
Reference in New Issue
Block a user