Wrap the xsrf token field in a div for html validation.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 6 Jul 2008 11:52:54 +0000 (13:52 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 10 Jul 2008 20:49:20 +0000 (22:49 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
plugins/function.xsrf_token_field.php

index 8eb2430..3b6932e 100644 (file)
@@ -21,7 +21,7 @@
 
 function smarty_function_xsrf_token_field($params, &$smarty) {
     if (S::has('xsrf_token')) {
-        return '<input type="hidden" name="token" value="' . S::v('xsrf_token') . '" />';
+        return '<div style="display: none"><input type="hidden" name="token" value="' . S::v('xsrf_token') . '" /></div>';
     }
     return '';
 }