I would like to sanitize a HTML document (created in google docs) so I can publish it on my CMS.
I have the source document in a string, from to , with header, style, b
Try like this:
var gdoc = 'Bar'; var data = $('').html(gdoc).find('#foo').html(); alert(data);
Demo.