Wrap the xsrf token field in a div for html validation.
[platal.git] / 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 '';
 }