diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 85fdbc2870f589bcdeff5e9729c43ea9334b5b7e..cf65c1c54561c28f504cc62721f70900f3be26f7 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -269,7 +269,7 @@ if ($result)
 
     print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
     print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
-    print '<input type="hidden" name="view" value="'.htmlspecialchars($view).'">';
+    print '<input type="hidden" name="view" value="'.dol_escape_htmltag($view).'">';
     print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
     print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';