This article covers in detail how you can easily strip tag attributes using a nifty function. It uses 4 parameters: The text you want to strip attributes from, the tags you want to strip attributes from, the array with the name of the attributes you want to strip and the optional text to append to the tag.