Rather an odd request, I'm sure, but given a Jquery selector, can I get the raw HTML of an item (and its children) so that I could, for example, put an escaped version of that HTML back on the page?
I'm happy doing the escaping, I've just no idea how to return the HTML from an object.
If there's a simple DOM-standard way of doing this too, I'm just as happy with that.
Edit to addresss the "Oh why didn't you just Google that": Google it. You'll get Jquery's .html()
and that will give you the inner HTML of an object. For example, let'sa say you have:
<div id="pants">naughty bits</div>
.html()
will only return naughty bits
. while the output I'm looking for is <div id="pants">naughty bits</div>