diff --git a/classes/Logging.php b/classes/Logging.php
index 88e39371bf8d23c6b0817a5e0e18d343f607bdea..d553739cffcef229cfad1ac2f1eef8284096c1e5 100644
--- a/classes/Logging.php
+++ b/classes/Logging.php
@@ -110,7 +110,7 @@ class Logging{
                                  date.getHours()+':'+
                                  date.getMinutes()+':'+
                                  date.getSeconds();
-             pres += '<h4>On '+dateFormatted+'</h4><pre>'+item.message.replace('>', '&gt;').replace('<', '&lt;')+'</pre>';
+             pres += '<h4>On '+dateFormatted+'</h4><pre>'+item.message.replace(/>/g, '&gt;').replace(/</g, '&lt;')+'</pre>';
            });
            $('#log').html(pres);
          }