I retrieve a lot of strings from a JSON file. These strings can contain HTML tags.
I would like to show the strings (for example a description of a product) but with a limit on the number of characters. So I have to count the number of characters and I would like to set a limit to 200 characters. But I want to exclude the characters of the HTML tags. The easiest method seems to me to strip HTML tags in the strings. I have searched in this forum and found some posts that deal with stripping out HTML tags: http://www.nabble.com/Strip-a-href-links-from-a-div-tf4372556s15494.html#a12476769 Strip a href links from a div http://www.nabble.com/stripping-out-tags...-tf2583359s15494.html#a7201797 Stripping out tags But they all require that you send a HTML tag as a parameter. But that's difficult if i'm not sure which HTML tag is going to be used. -- View this message in context: http://www.nabble.com/Strip-out-HTML-tags-tf4421390s15494.html#a12611168 Sent from the JQuery mailing list archive at Nabble.com.