Is it possible to pass HTML to a browser through JavaScript and parse it with jQuery, but not load external resources? (scripts, images, flash, anything)
I will do with the XML parser if that is the best I can do, but I would like to allow loose HTML if possible.
It must be compatible with Chrome, Firefox, the latest IE.
EDIT
Tested working
This will match src, href, link, data-foo, whatever... No way to link externally. http and https are both matched. inline scripts are killed. If it's still a security concern, then maybe this should be done server side, or obfuscate your JS.