jQuery + jQuery.Template: getting the result out as text
I posted originally on the Using Plugins forum but haven't had a response; since the template plugin is 'pseudo-core', I thought I'd try here instead. See the original topic for more background, but here are some targeted questions:
- How do I convert the result of $.tmpl() into a string representation of the HTML it represents?
- How do I handle templates which have multiple root elements with the above?
- How do I handle templates which include DOCTYPEs or other non-element content?
- How do I prevent <script> tags in templates from being loaded/evaluated during this process?
This is definitely turning out to have more challenges than anticipated ;-)