Development

Changeset 17097

You must first sign up to be able to contribute.

Changeset 17097

Show
Ignore:
Timestamp:
04/07/09 17:21:48 (4 years ago)
Author:
boutell
Message:

Safari/Chrome fix for successfully editing rich text areas of
more than one line in length, in PkFormHelper? (which offers pk_textarea_tag)
and in sfWidgetFormRichTextarea (which we are hopefully using in almost
all of our code already).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/pkToolkitPlugin/trunk/lib/widget/sfWidgetFormRichTextarea.class.php

    r16837 r17097  
    4949    $attributes = array_merge($attributes, $this->getOptions()); 
    5050    $editor->initialize($name, $value, $attributes); 
    51     return $editor->toHTML(); 
     51 
     52    // tom@punkave.com:  
     53    // Symfony contains an unfortunate "fix" to enable the old 
     54    // Symfony 1.0 fillin helper to see the linked hidden field as a 
     55    // type="text" field. This breaks any text with newlines in it in 
     56    // Safari and Chrome. Un-fix the fix until this gets corrected  
     57    // in an official Symfony 1.2 release.  
     58    // http://trac.symfony-project.com/ticket/732 
     59 
     60    $result = $editor->toHTML(); 
     61    $result = preg_replace('/type="text"/', 'type="hidden"', 
     62      $result, 1); 
     63    return $result; 
    5264  } 
    5365