Index: /trunk/FACT++/www/showlog.php
===================================================================
--- /trunk/FACT++/www/showlog.php	(revision 15188)
+++ /trunk/FACT++/www/showlog.php	(revision 15189)
@@ -61,4 +61,5 @@
 }
 
+/*
 function ascii2entities($string)
 {
@@ -72,4 +73,5 @@
     return $string;
 }
+*/
 
 function ansi_decode($matches)
@@ -253,5 +255,5 @@
     // font-weight property.
     if ($styles['bold'] && is_null($styles['color']))
-        $css .= ($css ? ';' : '') . 'font-weight: bold';
+        $css .= ($css ? ';' : '') . 'font-weight:bold';
 
     // color property.
@@ -274,12 +276,18 @@
     // Replace database strings
     $str = preg_replace("/\ (([[:word:].-]+)(:[^ ]+)?(@))?([[:word:].-]+)(:([[:digit:]]+))?(\/([[:word:].-]+))/", " $2$4$5$8", $str);
+
     // Replace special characters to their corresponding HTML entities
-    $str = ascii2entities($str);
+    //$str = ascii2entities($str);
+    $str = htmlentities($str, ENT_NOQUOTES);
+
     // Replace ANSI codes.
     $str = preg_replace_callback('/(?:\e\[\d+(?:;\d+)*m)+/', 'ansi_decode', "$str\033[0m");
+
     // Strip ASCII bell.
-    $str = str_replace("\007", '', $str);
+    // $str = str_replace("\007", '', $str);
+
     // Replace \n
     // $str = str_replace("\n", "<br/>\n", $str);
+
     // Return the parsed string.
     return $str;
@@ -338,7 +346,6 @@
    print("<meta http-equiv='refresh' content='".$refresh."'>\n");
 ?>
+<meta charset="UTF-8">
 <title><?php print($dir." - ".$name);?></title>
-</head>
-
 <script>
 function scroll(top)
@@ -347,4 +354,5 @@
 }
 </script>
+</head>
 <body onload="setTimeout(function(){scroll(false);},1);">
 <span onclick="scroll(true);" style="cursor:pointer;padding:0 5px 4px 7px;position:fixed;top:0;right:0;text-decoration:underline;color:navy;background-color:#f0f0f0;">go to top &uarr;</span>
@@ -355,6 +363,9 @@
 <?php
 foreach ($file as $line)
-    print(ansi2html($line));
+    print(ansi2html(substr($line, 0, -1))."\n");
 ?>
-</pre><span id="bottom""/></body>
+
+</pre>
+<span id="bottom"></span>
+</body>
 </html>
