aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-10-11 11:57:03 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-10-11 11:57:03 +0000
commitb2a26d6bf8ebdf84fb30f6948bdef0255fe392a1 (patch)
treee0b5250dea0fb9c6846511edaba6086a22cd7f16 /phpBB/posting.php
parent8f4967a2289d65f4539ec8eb593eda5fb9200e35 (diff)
downloadforums-b2a26d6bf8ebdf84fb30f6948bdef0255fe392a1.tar
forums-b2a26d6bf8ebdf84fb30f6948bdef0255fe392a1.tar.gz
forums-b2a26d6bf8ebdf84fb30f6948bdef0255fe392a1.tar.bz2
forums-b2a26d6bf8ebdf84fb30f6948bdef0255fe392a1.tar.xz
forums-b2a26d6bf8ebdf84fb30f6948bdef0255fe392a1.zip
do not remove multiple newlines for posting message
git-svn-id: file:///svn/phpbb/trunk@4552 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 40442f6a52..c83acd0d7e 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -393,7 +393,7 @@ if (($save || isset($_POST['draft_save'])) && $user->data['user_id'] != ANONYMOU
else
{
$subject = request_var('subject', '');
- $message = request_var('message', '');
+ $message = (isset($_POST['message'])) ? htmlspecialchars(trim(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message']))) : '';
if ($message != '')
{
@@ -434,7 +434,7 @@ if ($submit || $preview || $refresh)
$subject = phpbb_strtolower($subject);
}
- $message_parser->message = request_var('message', '');
+ $message_parser->message = (isset($_POST['message'])) ? htmlspecialchars(trim(str_replace(array('\\\'', '\\"', '\\0', '\\\\'), array('\'', '"', '\0', '\\'), $_POST['message']))) : '';
$username = (!empty($_POST['username'])) ? request_var('username', '') : ((!empty($username)) ? $username : '');
$topic_type = (isset($_POST['topic_type'])) ? (int) $_POST['topic_type'] : (($mode != 'post') ? $topic_type : POST_NORMAL);