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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user