From ecf5aec1ae6e68d84dc2cb8c47edc54ae1d93863 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 2 Feb 2014 21:20:31 -0500 Subject: [PATCH] Add '@' to the list of characters removed from radio/checkbox ID. This character can easily show up in email addresses and can cause invalid HTML. Refs #2733 --- lib/Cake/View/Helper/FormHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 32f1257be..481dc91c6 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -2083,7 +2083,7 @@ class FormHelper extends AppHelper { */ public function domIdSuffix($value, $type = 'html5') { if ($type === 'html5') { - $value = str_replace(array('<', '>', ' ', '"', '\''), '_', $value); + $value = str_replace(array('@', '<', '>', ' ', '"', '\''), '_', $value); } else { $value = preg_replace('~[^\\pL\d-_]+~u', '_', $value); }