Can you tell me what problem you are trying to solve?
Most people aren't going to want to store HTML in their database because that data may be used for other data formats, such as JSON, XML, plain text emails, etc. What you probably are looking for is the encode
action for columns in an fActiveRecord. If you have a first_name
column, you can call $user->encodeFirstName()
and it will return the first name, encoded for output into HTML. This way your database stores clean data and you don't have to worry about cross-site scripting.