protected function stripHtmlTags( $string )
	{
		$string = preg_replace( '@<(embed|head|noembed|noscript|object|script|style)[^>]*?>.*?</\\1>@siu', '', $string );
		$string = preg_replace( '@</(div|h[1-9]|p|pre|tr)@iu', "\r\n\$0", $string );
		$string = preg_replace( '@</(td|th)@iu', " \$0", $string );
		$string = preg_replace( '@<(li)[^>]*?>@siu', "\$0-o-^-o-", $string );
		$string = wp_strip_all_tags( $string );
		$string = wp_specialchars_decode( $string, ENT_QUOTES );
		$string = preg_replace( '/\v(?:[\v\h]+){2,}/', "\r\n\r\n", $string );
		$string = str_replace( '-o-^-o-', ' - ', $string );
		return html_entity_decode( $string, ENT_QUOTES, 'UTF-8' );
	}
protected function stripHtmlTags( $string )
	{
		$string = preg_replace( '@<(embed|head|noembed|noscript|object|script|style)[^>]*?>.*?</\\1>@siu', '', $string );
		$string = preg_replace( '@</(div|h[1-9]|p|pre|tr)@iu', "\r\n\$0", $string );
		$string = preg_replace( '@</(td|th)@iu', " \$0", $string );
		$string = preg_replace( '@<(li)[^>]*?>@siu', "\$0-o-^-o-", $string );
		$string = wp_strip_all_tags( $string );
		$string = wp_specialchars_decode( $string, ENT_QUOTES );
		$string = preg_replace( '/\v(?:[\v\h]+){2,}/', "\r\n\r\n", $string );
		$string = str_replace( '-o-^-o-', ' - ', $string );
		return html_entity_decode( $string, ENT_QUOTES, 'UTF-8' );
	}
protected function stripHtmlTags ( $ string ) { $ string = preg_replace ( '@<(embed|head|noembed|noscript|object|script|style)[^>]*?>.*?</\\1>@siu' , '' , $ string ) ; $ string = preg_replace ( '@</(div|h[1-9]|p|pre|tr)@iu' , "\r\n\$0" , $ string ) ; $ string = preg_replace ( '@</(td|th)@iu' , " \$0" , $ string ) ; $ string = preg_replace ( '@<(li)[^>]*?>@siu' , "\$0-o-^-o-" , $ string ) ; $ string = wp_strip_all_tags ( $ string ) ; $ string = wp_specialchars_decode ( $ string , ENT_QUOTES ) ; $ string = preg_replace ( '/\v(?:[\v\h]+){2,}/' , "\r\n\r\n" , $ string ) ; $ string = str_replace ( '-o-^-o-' , ' - ' , $ string ) ; return html_entity_decode ( $ string , ENT_QUOTES , 'UTF-8' ) ; }
- remove invisible elements
- replace certain elements with a line-break
- replace certain table elements with a space
- add a placeholder for plain-text bullets to list elements
- strip all remaining HTML tags
@return string
- remove invisible elements - replace certain elements with a line - break - replace certain table elements with a space - add a placeholder for plain - text bullets to list elements - strip all remaining HTML tags