BUG: Fix checkbox group with " in option titles.

This commit is contained in:
Jyrki Lilja 2013-05-08 10:08:21 +03:00 committed by Jyrki Lilja
parent 1af685952a
commit e8aeb692fd
2 changed files with 9 additions and 5 deletions

View File

@ -16,9 +16,9 @@ class EditableCheckboxGroupField extends EditableMultipleOptionField {
public function getFormField() {
$optionSet = $this->Options();
$options = array();
$optionMap = ($optionSet) ? $optionSet->map('Title', 'Title') : array();
$optionMap = ($optionSet) ? $optionSet->map('EscapedTitle', 'Title') : array();
return new CheckboxSetField($this->Name, $this->Title, $optionMap);
}
@ -40,4 +40,4 @@ class EditableCheckboxGroupField extends EditableMultipleOptionField {
}
return $result;
}
}
}

View File

@ -70,4 +70,8 @@ class EditableOption extends DataObject {
$this->readonly = true;
return $this->EditSegment();
}
}
public function getEscapedTitle() {
return Convert::raw2att(parent::getTitle());
}
}