diff --git a/include/class_msg_dialog.inc b/include/class_msg_dialog.inc
index b38f2b3f11854d5b65635f3e94cfb19990de88c0..800a3c28a5ee772766aa12b614622dc9d6470f78 100644
--- a/include/class_msg_dialog.inc
+++ b/include/class_msg_dialog.inc
@@ -169,12 +169,12 @@ class msg_dialog
         '<table style="width:100%; border:2px solid red;">
           <tr>
             <td style="vertical-align:top;padding:10px">
-              <img src="geticon.php?context=status&amp;icon=dialog-error&amp;size=32" alt="'._('Error').'"/>
+              <img src="geticon.php?context=status&amp;icon=dialog-error&amp;size=32" alt="'.htmlentities(_('Error'), ENT_COMPAT, 'UTF-8').'"/>
             </td>
             <td style="width:100%">
-              <b>'.$this->s_Title.'</b><br/>
-              '.$this->s_Message.'<br><br/>
-              '._('Please fix the above error and reload the page.').'
+              <b>'.htmlentities($this->s_Title, ENT_COMPAT, 'UTF-8').'</b><br/>
+              '.htmlentities($this->s_Message, ENT_COMPAT, 'UTF-8').'<br><br/>
+              '.htmlentities(_('Please fix the above error and reload the page.'), ENT_COMPAT, 'UTF-8').'
             </td>
           </tr>
         </table></body></html>';