1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 04:30:29 +01:00

Fix stripslashing on errors, preview, poll option addition

git-svn-id: file:///svn/phpbb/trunk@1508 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-12-04 18:08:43 +00:00
parent a6dbcd472c
commit 3da714e11a

View File

@ -2181,11 +2181,6 @@ else if( $preview || $refresh || $error )
$poll_options = 0;
$poll_option_list = array();
if( isset($HTTP_POST_VARS['del_poll_option']) || isset($HTTP_POST_VARS['poll_option_text']) || isset($HTTP_POST_VARS['add_poll_option']) )
{
$post_message = stripslashes($post_message);
}
if( isset($HTTP_POST_VARS['del_poll_option']) )
{
if( isset($HTTP_POST_VARS['poll_option_text']) )
@ -2505,7 +2500,6 @@ if( $preview && !$error )
$preview_subject = $post_subject;
$preview_message = stripslashes(prepare_message($post_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
//
// Finalise processing as per viewtopic
@ -2718,6 +2712,15 @@ switch($mode)
break;
}
//
// If post_message is not empty (as per a preview or error )
// then stripslashes
//
if( !empty($post_message) && $mode != "edit" && $mode != "reply" )
{
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
}
//
// Output the data to the template
//