|
From: Paul S. O. <ps...@us...> - 2001-12-04 18:08:46
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv14613
Modified Files:
posting.php
Log Message:
Fix stripslashing on errors, preview, poll option addition
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -r1.118 -r1.119
*** posting.php 2001/12/03 12:21:53 1.118
--- posting.php 2001/12/04 18:08:43 1.119
***************
*** 2182,2190 ****
$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']) )
{
--- 2182,2185 ----
***************
*** 2506,2510 ****
$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));
//
--- 2501,2504 ----
***************
*** 2717,2720 ****
--- 2711,2723 ----
$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
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));
}
|