aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
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