1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

[ticket/11638] generate_text_for_display on viewtopic.php

lines: 835-843

sub-task of ticket PHPBB3-11635:
find and fix all bypasses of generate_text_for_*

PHPBB3-11638
This commit is contained in:
Bruno Ais 2013-07-13 13:49:19 +01:00
parent b5651c0289
commit b4fcdc51e9

View File

@ -828,26 +828,15 @@ if (!empty($topic_data['poll_start']))
$poll_total += $poll_option['poll_option_total'];
}
if ($poll_info[0]['bbcode_bitfield'])
{
$poll_bbcode = new bbcode();
}
else
{
$poll_bbcode = false;
$parse_bbcode_flags = OPTION_FLAG_SMILIES;
if(empty($poll_info[0]['bbcode_bitfield'])){
$parse_bbcode_flags |= OPTION_FLAG_BBCODE;
}
for ($i = 0, $size = sizeof($poll_info); $i < $size; $i++)
{
$poll_info[$i]['poll_option_text'] = censor_text($poll_info[$i]['poll_option_text']);
if ($poll_bbcode !== false)
{
$poll_bbcode->bbcode_second_pass($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield']);
}
$poll_info[$i]['poll_option_text'] = bbcode_nl2br($poll_info[$i]['poll_option_text']);
$poll_info[$i]['poll_option_text'] = smiley_text($poll_info[$i]['poll_option_text']);
$poll_info[$i]['poll_option_text'] = generate_text_for_display($poll_info[$i]['poll_option_text'], $poll_info[$i]['bbcode_uid'], $poll_option['bbcode_bitfield'], $parse_bbcode_flags, true);
}
$topic_data['poll_title'] = censor_text($topic_data['poll_title']);