Special characters like german "umlaute" are now proberly replaced

This means characters like  will be replaced with ä for example.
This works for the detail page and the index page
This commit is contained in:
Andre Lorbach 2008-04-28 15:43:06 +02:00
parent 89deb11c3a
commit 88888d3dc8
2 changed files with 6 additions and 6 deletions

View File

@ -247,8 +247,10 @@ if ( isset($content['Sources'][$currentSourceID]) ) // && $content['uid_current'
}
else if ( $content['fields'][$mycolkey]['FieldType'] == FILTER_TYPE_STRING )
{
// kindly copy!
$content['fields'][$mycolkey]['fieldvalue'] = $logArray[$mycolkey];
if ( $mycolkey == SYSLOG_MESSAGE )
$content['fields'][$mycolkey]['fieldvalue'] = GetStringWithHTMLCodes($logArray[$mycolkey]);
else // kindly copy!
$content['fields'][$mycolkey]['fieldvalue'] = $logArray[$mycolkey];
}
// Increment helpcounter

View File

@ -519,10 +519,8 @@ function DieWithFriendlyErrorMsg( $szerrmsg )
function GetStringWithHTMLCodes($myStr)
{
// First of all replace special characters with valid HTML representations!
$searchfor = array( "&", "<", ">" );
$replacewith = array( "&amp;", "&lt;", "&gt;" );
return str_replace ( $searchfor, $replacewith, $myStr);
// Replace all special characters with valid html representations
return htmlentities($myStr);
}
function InitTemplateParser()