diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-04 18:08:43 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-12-04 18:08:43 +0000 |
commit | 3da714e11a6eaa6d1d46703f59e5a0c44c673446 (patch) | |
tree | 710c0cf55cf0f674371407f7ecc8c2983730cd9a /phpBB/posting.php | |
parent | a6dbcd472c64db42ac549b83f890f0b9b0f41572 (diff) | |
download | forums-3da714e11a6eaa6d1d46703f59e5a0c44c673446.tar forums-3da714e11a6eaa6d1d46703f59e5a0c44c673446.tar.gz forums-3da714e11a6eaa6d1d46703f59e5a0c44c673446.tar.bz2 forums-3da714e11a6eaa6d1d46703f59e5a0c44c673446.tar.xz forums-3da714e11a6eaa6d1d46703f59e5a0c44c673446.zip |
Fix stripslashing on errors, preview, poll option addition
git-svn-id: file:///svn/phpbb/trunk@1508 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 75672fe4eb..3a13bc0fc3 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -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 @@ -2719,6 +2713,15 @@ switch($mode) } // +// 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 // $template->assign_vars(array( |