mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10663 from lekoala/patch-33
FIX Prevent backslash in CSS class name
This commit is contained in:
commit
20e4aae25b
@ -207,7 +207,7 @@ class PermissionCheckboxSetField extends FormField
|
|||||||
|
|
||||||
$odd = ($odd + 1) % 2;
|
$odd = ($odd + 1) % 2;
|
||||||
$extraClass = $odd ? 'odd' : 'even';
|
$extraClass = $odd ? 'odd' : 'even';
|
||||||
$extraClass .= ' val' . str_replace(' ', '', $code ?? '');
|
$extraClass .= ' val' . str_replace([' ', '\\'], ['', '-'], $code ?? '');
|
||||||
$itemID = $this->ID() . '_' . preg_replace('/[^a-zA-Z0-9]+/', '', $code ?? '');
|
$itemID = $this->ID() . '_' . preg_replace('/[^a-zA-Z0-9]+/', '', $code ?? '');
|
||||||
$disabled = $inheritMessage = '';
|
$disabled = $inheritMessage = '';
|
||||||
$checked = (isset($uninheritedCodes[$code]) || isset($inheritedCodes[$code]))
|
$checked = (isset($uninheritedCodes[$code]) || isset($inheritedCodes[$code]))
|
||||||
|
Loading…
Reference in New Issue
Block a user