JumboLove
6/17/2013 - 2:04 PM

Remove HTML from a string

Remove HTML from a string

function getShortDescription(product : Product) {  
	var description : String = product.getLongDescription().toString();
	var htmlTest : RegExp = new RegExp("(<([^>]+)>)", "ig");
	description = description.replace(htmlTest, "");
	return description;
}