From 4e8e766ed654f96799153cce727a650907c66277 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 24 Oct 2009 13:04:26 +0000 Subject: revert r9910 - ticket #1309 Reason for revert: http://www.phpbb.com/bugs/phpbb3/ticket.php?ticket_id=1309&start=8#post193395 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10229 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 3df582d640..4961979d73 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -115,7 +115,7 @@ class bbcode_firstpass extends bbcode 'attachment' => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")), 'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")), 'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")), - 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\]((?s).*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")), + 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")), 'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")), 'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")), 'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")), -- cgit v1.2.1 From b5c4dc32848e64842077d1a35d5649a38ef194b6 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 1 Nov 2009 15:33:44 +0000 Subject: check for additional empty config variables... git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10249 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 4961979d73..8979511d9a 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1064,17 +1064,12 @@ class parse_message extends bbcode_firstpass $this->mode = $mode; - if (!isset($config['max_' . $mode . '_chars'])) + foreach (array('chars', 'smilies', 'urls', 'font_size', 'img_height', 'img_width') as $key) { - $config['max_' . $mode . '_chars'] = 0; - } - if (!isset($config['max_' . $mode . '_smilies'])) - { - $config['max_' . $mode . '_smilies'] = 0; - } - if (!isset($config['max_' . $mode . '_urls'])) - { - $config['max_' . $mode . '_urls'] = 0; + if (!isset($config['max_' . $mode . '_' . $key])) + { + $config['max_' . $mode . '_' . $key] = 0; + } } $this->allow_img_bbcode = $allow_img_bbcode; -- cgit v1.2.1