diff --git a/src/details.php b/src/details.php index e51a45b..71261bb 100644 --- a/src/details.php +++ b/src/details.php @@ -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 diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 9df8945..136d249 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -519,10 +519,8 @@ function DieWithFriendlyErrorMsg( $szerrmsg ) function GetStringWithHTMLCodes($myStr) { - // First of all replace special characters with valid HTML representations! - $searchfor = array( "&", "<", ">" ); - $replacewith = array( "&", "<", ">" ); - return str_replace ( $searchfor, $replacewith, $myStr); + // Replace all special characters with valid html representations + return htmlentities($myStr); } function InitTemplateParser()