Here is my trick. Use cdata:
<div>
<p>The next line is inserted verbatim</p>
<% cdata $ "<p>a fragment kept in a simple cms-ish system</p>" %>
</div>
Now, that is only good if the String you are inserting is actually
valid HTML. But you can validate those HTML fragments using anything
you want..
It's probably a good idea to use sanitizeBalance from xss-sanitize as
well,
<div>
<p>The next line is inserted verbatim</p>
<% cdata $ sanitizeBalance "<p>a fragment kept in a simple cms-ish
system</p>" %>
</div>
If you actually wanted to process the XML -- then this won't work.
But if all you are trying to do is splice stuff in -- then this trick
works.
I use this trick so that posts and comments can be written in markdown
and run through the markdown perl script (since pandoc has a
restrictive license).
hope this helps!
- jeremy
On Apr 5, 3:15 pm, thomas hartman <
thomashartm...@googlemail.com>
wrote: