mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
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
This commit is contained in:
parent
405f3a1cb9
commit
ecf5aec1ae
1 changed files with 1 additions and 1 deletions
|
@ -2083,7 +2083,7 @@ class FormHelper extends AppHelper {
|
||||||
*/
|
*/
|
||||||
public function domIdSuffix($value, $type = 'html5') {
|
public function domIdSuffix($value, $type = 'html5') {
|
||||||
if ($type === 'html5') {
|
if ($type === 'html5') {
|
||||||
$value = str_replace(array('<', '>', ' ', '"', '\''), '_', $value);
|
$value = str_replace(array('@', '<', '>', ' ', '"', '\''), '_', $value);
|
||||||
} else {
|
} else {
|
||||||
$value = preg_replace('~[^\\pL\d-_]+~u', '_', $value);
|
$value = preg_replace('~[^\\pL\d-_]+~u', '_', $value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue