When writing out the category description in my theme (on archives and special category listings) for example, there are times I need the description in full html mode and others when I need it returned stripped of any html.
In the code below, I actually need the stripped version of the description, however $category->description returns the full description with all tags, which is rendering my strlen snippet function inoperable depending on where it breaks.
How can I obtain an html stripped version of the description in the loop below?
foreach($categories as $category) {
echo '<li style="clear:both;">'.get_category_thumbnail($category->term_id, 'thumbnail').'<a style="display:block;margin-top:20px;" href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>';
if(strlen($category->description) > 300 ) echo SUBSTR( $category->description,0,STRPOS( $category->description,".",300)+1);
else echo $category->description;