aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2016-10-03 20:05:49 +0200
committerTristan Darricau <github@nicofuma.fr>2016-10-03 20:05:49 +0200
commit1ad64f89b817a42722b522f4a763424eea3b5a5f (patch)
treed4210f8a202f386ef4f3bb47b456ae5300943b64 /phpBB/includes
parent85e4566223487899f3a2789983cb50e68296a982 (diff)
parentbf8ee698f9275b8baf46ebe74de79cd54a30756b (diff)
downloadforums-1ad64f89b817a42722b522f4a763424eea3b5a5f.tar
forums-1ad64f89b817a42722b522f4a763424eea3b5a5f.tar.gz
forums-1ad64f89b817a42722b522f4a763424eea3b5a5f.tar.bz2
forums-1ad64f89b817a42722b522f4a763424eea3b5a5f.tar.xz
forums-1ad64f89b817a42722b522f4a763424eea3b5a5f.zip
Merge pull request #4471 from dsinn/ticket/14802
[ticket/14802] Empty/blank lines should not be additional poll options * dsinn/ticket/14802: [ticket/14802] Add test for empty/blank lines in poll options [ticket/14802] Empty/blank lines should not be additional poll options
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/message_parser.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e63f6b822b..16b65fb83e 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1822,7 +1822,7 @@ class parse_message extends bbcode_firstpass
$this->message = $poll['poll_title'];
$this->bbcode_bitfield = $bbcode_bitfield;
- $poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
+ $poll['poll_options'] = preg_split('/\s*?\n\s*/', trim($poll['poll_option_text']));
$poll['poll_options_size'] = sizeof($poll['poll_options']);
if (!$poll['poll_title'] && $poll['poll_options_size'])