aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2015-03-26 11:15:37 +0100
committerAndreas Fischer <bantu@phpbb.com>2015-03-26 11:15:37 +0100
commit499088b62f686482fd9419be83baef9a7c5ab1c2 (patch)
treedf4032eecdddd3ebd0f8e556c83da3a01efad7d6 /phpBB
parent9d75f3fca8bc94fd5f3357693e1c9df3b45e3ba1 (diff)
parent1efbb5b3bbd8c0b38c0f265453514dfd87ef04f0 (diff)
downloadforums-499088b62f686482fd9419be83baef9a7c5ab1c2.tar
forums-499088b62f686482fd9419be83baef9a7c5ab1c2.tar.gz
forums-499088b62f686482fd9419be83baef9a7c5ab1c2.tar.bz2
forums-499088b62f686482fd9419be83baef9a7c5ab1c2.tar.xz
forums-499088b62f686482fd9419be83baef9a7c5ab1c2.zip
Merge branch '3.0.x' into 3.1.x
* 3.0.x: [ticket/13555] Render poll options separately when previewing.
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/posting.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index ac412c0c73..a65ba46fc9 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1517,9 +1517,13 @@ if (!sizeof($error) && $preview)
'L_MAX_VOTES' => $user->lang('MAX_OPTIONS_SELECT', (int) $post_data['poll_max_options']),
));
- $parse_poll->message = implode("\n", $post_data['poll_options']);
- $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
- $preview_poll_options = explode('<br />', $parse_poll->message);
+ $preview_poll_options = array();
+ foreach ($post_data['poll_options'] as $poll_option)
+ {
+ $parse_poll->message = $poll_option;
+ $parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
+ $preview_poll_options[] = $parse_poll->message;
+ }
unset($parse_poll);
foreach ($preview_poll_options as $key => $option)