Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

populate using fRequest::encode

posted by bret 9 years ago

Is it possible to have the fActiveRecord::populate() use fRequest::encode() instead of fRequest::get()?

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.

posted by wbond 9 years ago

you are correct, thanks.

posted by bret 9 years ago