[TYPO3-english] Re: how to: properly escape strings in 4.5.30?

Calgacus map Brude calgach at gmail.com
Fri Nov 22 20:36:14 CET 2013

I now apply 
 $GLOBALS['TYPO3_DB']->quoteStr(strip_tags($value),'tx_xxxs_domain_model_prize' ); 
to my stuff before updating or creating and it properly adds the slashes ( I'm not sure how it uses my tablename in the call but it seems to work so ok).  But when I read stuff up and remove the slashes to display like so in my model:

  public function UnEscapePrize( ){
               $this->setTitle(stripslashes( $this->getTitle()));
               ..... other vars get un-escaped

the removal of slashes gets saved into the database which is not what I want.  I just want to remove them for the view. How can I do so?

More information about the TYPO3-english mailing list