rendered paste bodyfunction stripLargeTags($html){
$searches = array (
"/<!\[CDATA\[(.*)\]\]>/si", // Remove CData
"/<script[^>]*?>.*?<\/script>/si", // Strip out javascript
"/<style[^>]*>.*?<\/style>/si", // Strip out styles
"/<code[^>]*>.*?<\/code>/si", // Strip out code chunks
"/<!--.*?-->/s", // Strip comments
"/<!.*>/Us", // Strip !Tags
"/<\?.*>/Us" // Strip !Tags
);
$replace = array();
foreach($searches as $search){
array_push($replace, ''); // Replace all with ''
}
reset($searches);
$text = preg_replace($searches, $replace, htmlentities($html));
return html_entity_decode($text);
}