views:

21

answers:

1

I'm using Cake1.2 and have a CMS page which was working fine. Now it seems that someone has pasted in content from Word, which has obviously got lots of random ' and " characters in. The classic word ones.

Now my form will not display the content. I have pr()'d my $this->data and all the content is there, hell I can even echo it out.

I am displaying my form field thus,

echo $form->input('text', array('type'=>'textarea', 'between'=>'<br />'));

It works 8/10 times, but often the field will be blank. I'm assuming it's to do with the Word characters not being displayable, but to just not populate the whole field? Can I escape the characters in the input? I've been trauling the docs looking for a way to pass data in without extending the helper for a custom method.

I guess if all else fails I'll just write my own markup.

A: 

I just emulated the markup in the end.

<div class="input textarea required">
  <label for="UserReviewText">Text</label>
  <textarea id="UserReviewText" rows="10" cols="30" name="data[UserReview][text]"><?php echo htmlentities($this->data['UserReview']['text']); ?></textarea>
</div>
DavidYell