/**
* Removes HTML from the string.
* v2 - Mod by Steve Bryant to find trailing, half done HTML.
* v4 mod by James Moberg - empties out script/style blocks
* v5 mod by dolphinsboy
*
* @param string String to be modified. (Required)
* @return Returns a string.
* @author Raymond Camden (ray@camdenfamily.com)
* @version 4, October 4, 2010
*/
function stripHTML(str) {
// remove the whole tag and its content
var list = "style,script,noscript";
for (var tag in list){
str = reReplaceNoCase(str, "]*?>(.*?)","","all");
}
str = reReplaceNoCase(str, "<.*?>","","all");
//get partial html in front
str = reReplaceNoCase(str, "^.*?>","");
//get partial html at end
str = reReplaceNoCase(str, "<.*$","");
return trim(str);
}