aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorDaniel Sinn <daniel.p.sinn@gmail.com>2016-09-29 14:43:36 -0400
committerDaniel Sinn <daniel.p.sinn@gmail.com>2016-09-29 14:43:36 -0400
commit0b3951cb815986abfe5645387091d49982c138b9 (patch)
tree288ab1aba069b1111efee2532d5b8ff82f17cf62 /phpBB/includes/message_parser.php
parent6972d06f5921c9fab8e469139ed5646bb495eb8e (diff)
downloadforums-0b3951cb815986abfe5645387091d49982c138b9.tar
forums-0b3951cb815986abfe5645387091d49982c138b9.tar.gz
forums-0b3951cb815986abfe5645387091d49982c138b9.tar.bz2
forums-0b3951cb815986abfe5645387091d49982c138b9.tar.xz
forums-0b3951cb815986abfe5645387091d49982c138b9.zip
[ticket/14802] Empty/blank lines should not be additional poll options
PHPBB3-14802
Diffstat (limited to 'phpBB/includes/message_parser.php')
-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'])