Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18433

ezoption drops all content after first quote mark ("), when editing object

    XMLWordPrintable

    Details

      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>
      

        Attachments

          Activity

            People

            Assignee:
            unknown unknown
            Reporter:
            vytis Vytautas Germanavičius
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: