-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 3.0.13
-
Fix Version/s: 3.0.14-RC1, 3.1.4-RC1, 3.2.0-a1
-
Component/s: Posting
-
Labels:None
-
Environment:PHP 5.4.7
-
GitHub Pull Request URL:
1. Create a custom BBCode (i.e. [br][/br]) that renders to <br />
2. Create/edit one poll option using that BBCode
3. Preview the poll (with its option)
You'll see it renders as two options instead of one option. The culprit is in \posting.php:
$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);
|
A more than obvious fix is to parse each poll option on it's own by simply replacing the code above with:
$preview_poll_options= array();
|
foreach( $post_data['poll_options'] as $iPollOption=> $sPollOption ) {
|
$parse_poll-> message= $sPollOption;
|
$parse_poll-> format_display( $post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies'] );
|
$preview_poll_options[$iPollOption]= $parse_poll-> message;
|
}
|