diff --git a/templates/error.php b/templates/error.php
index fadbab0e0c1da7f31af93ea5814a2f1082a941b9..f450409b1531b039c7daf440c6deb2be3da23fd2 100644
--- a/templates/error.php
+++ b/templates/error.php
@@ -47,7 +47,7 @@ if (isset($this->data['errorReportAddress'])) {
 	<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
 	
 		<p><?php echo $this->t('report_text'); ?></p>
-		<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo($this->data['email']); ?>" />
+		<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
 	
 		<p>
 		<textarea style="width: 300px; height: 100px" name="text"><?php echo $this->t('report_explain'); ?></textarea>