php - CakePHP: Strip HTML using Text helper? -


i'm using truncate method of text helper , in doing means html included in text being rendered. there anyway set text helper strip out html tags?

           echo $text->truncate(                     $project['project']['description'],                  250,                    array(                     'ending' => '...',                      'exact' => false                 )             ); 

is there modification similar striplinks method?

thanks,

jonesy

echo $text->truncate(                 $project['project']['description'],              250,                array(                 'ending' => '...',                  'exact' => false,                 'html' => true             )         ); 

that make respect html structure. can use strip_tags(), there nothing wrong using php functions in cake :)


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -