I got a form value in which I need to strip html tags and not the other things. Example: I pass following in textarea I need to get following outcome When I try strip tags it removed 5 years also which I dont want. Many thanks for those who help on this.! Answer You need to pre-process the HTML to