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
Post a Comment