1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

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
This commit is contained in:
Paul S. Owen
2001-11-26 14:07:33 +00:00
parent 8e50e5eb4e
commit 1d3f1cee55
2 changed files with 15 additions and 11 deletions

View File

@@ -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("&lt;", "&gt;", "&amp; ");
$html_entities_match = array("#&#", "#<#", "#>#");
$html_entities_replace = array("&amp;", "&lt;", "&gt;");
$message = preg_replace("#&([a-z0-9]+?);#i", "&amp;\\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("&lt;", "&gt;", "&amp; ");
$html_entities_match = array("#&#", "#<#", "#>#");
$html_entities_replace = array("&amp;", "&lt;", "&gt;");
$message = preg_replace($html_entities_match, $html_entities_replace, $message);
}