Details
-
Bug
-
Resolution: Obsolete
-
Medium
-
None
-
4.2.0
-
None
Description
If user tries to make options which contaisns text with quotes, after adding another option, text after first qute mark is lost.
As i understand, problem is in /design/standard/templates/content/datatype/edit/ezoption.tpl
Tempalte writes content to text field as it is, without washing
<td> <input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_{$Options.index}" class="box ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_option_value_{$attribute.id}[]" value="{$Options.item.value}" /> </td>
it make htm like :
value="text text "text in quotes, which wil be lost on submit""
Problem is solved by adding |wash():
<td> <input id="ezcoa-{if ne( $attribute_base, 'ContentObjectAttribute' )}{$attribute_base}-{/if}{$attribute.contentclassattribute_id}_{$attribute.contentclass_attribute_identifier}_{$Options.index}" class="box ezcc-{$attribute.object.content_class.identifier} ezcca-{$attribute.object.content_class.identifier}_{$attribute.contentclass_attribute_identifier}" type="text" name="{$attribute_base}_data_option_value_{$attribute.id}[]" value="{$Options.item.value|wash()}" /> </td>