Problem saving HTML

Hey Guys

I’m just trying to save a textarea that contains HTML to the database. The attribute is defined as ‘safe’.

When I dump the model before saving, the attribute contains HTML. When I dump it after saving, it doesn’t. So it happens somewhere during the saving of the model.

Is there something I’m forgetting or is there a special filter for HTML input?

If you are talking about safe as a rule then that just means it’s ok to mass assign those values to the model, it doesn’t mean some data transformation occurs.

Are you sure there isn’t something else going on with the data, CActiveRecord shouldn’t just arbitrarily drop those characters.

See more about safe here:

Understanding Safe Validation Rules

Turns out the tags were stripped in a higher level class. Anyway, thanks a lot for the response Luke.