aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-09-06 16:48:15 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-09-06 16:48:15 +0000
commitad2b76ea294d29efbe1b1c68675784e48928dbdf (patch)
tree42d79695ca409a95b501954563361ac09c4d0b5c /phpBB
parent2404f6daf5b7eac15a3b2b37c762accae2f7c949 (diff)
downloadforums-ad2b76ea294d29efbe1b1c68675784e48928dbdf.tar
forums-ad2b76ea294d29efbe1b1c68675784e48928dbdf.tar.gz
forums-ad2b76ea294d29efbe1b1c68675784e48928dbdf.tar.bz2
forums-ad2b76ea294d29efbe1b1c68675784e48928dbdf.tar.xz
forums-ad2b76ea294d29efbe1b1c68675784e48928dbdf.zip
Possible fix for bug #459075, please report any strange behaviour with this update
git-svn-id: file:///svn/phpbb/trunk@994 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/posting.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index cd3e51e3fe..7ca8e626dc 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -30,6 +30,8 @@ include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
// Do some initial checks, set basic variables,
// etc.
//
+$html_entities_match = array("#<#", "#>#", "#& #");
+$html_entities_replace = array("&lt;", "&gt;", "&amp; ");
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
@@ -1667,7 +1669,7 @@ else
$post_message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
- $post_message = undo_htmlspecialchars($post_message);
+ $post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
$post_message = preg_replace('#</textarea>#si', '&lt;/textarea&gt;', $post_message);
//
@@ -1853,6 +1855,11 @@ if( $preview && !$error )
);
$template->pparse("preview");
+ //
+ // Post preview output conversion
+ //
+ $post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
+
}
//
// End preview output