diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-26 14:07:33 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-26 14:07:33 +0000 |
commit | 1d3f1cee552ed6986e6109ad1e5df432d4c944f4 (patch) | |
tree | 0e7829718db8bf797fb1e1b6cff80e526ba8b43c /phpBB/includes/post.php | |
parent | 8e50e5eb4e9ffc37e1d97aa39c22295086212f6a (diff) | |
download | forums-1d3f1cee552ed6986e6109ad1e5df432d4c944f4.tar forums-1d3f1cee552ed6986e6109ad1e5df432d4c944f4.tar.gz forums-1d3f1cee552ed6986e6109ad1e5df432d4c944f4.tar.bz2 forums-1d3f1cee552ed6986e6109ad1e5df432d4c944f4.tar.xz forums-1d3f1cee552ed6986e6109ad1e5df432d4c944f4.zip |
Fixes various issues inc. bugs #485538, #485323 and an incorrect conversion of some accented chars (thanks Ashe for noting it)
git-svn-id: file:///svn/phpbb/trunk@1453 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/post.php')
-rw-r--r-- | phpBB/includes/post.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/includes/post.php b/phpBB/includes/post.php index db77d05498..b43b055257 100644 --- a/phpBB/includes/post.php +++ b/phpBB/includes/post.php @@ -37,8 +37,10 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid if( $html_on ) { - $html_entities_match = array("#<#", "#>#", "#& #"); - $html_entities_replace = array("<", ">", "& "); + $html_entities_match = array("#&#", "#<#", "#>#"); + $html_entities_replace = array("&", "<", ">"); + + $message = preg_replace("#&([a-z0-9]+?);#i", "&\\1;", $message); $start_html = 1; @@ -81,8 +83,8 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid } else { - $html_entities_match = array("#<#", "#>#", "#& #"); - $html_entities_replace = array("<", ">", "& "); + $html_entities_match = array("#&#", "#<#", "#>#"); + $html_entities_replace = array("&", "<", ">"); $message = preg_replace($html_entities_match, $html_entities_replace, $message); } |