Excellent question and thought process on your part. FWIW, Text::Xslate and a couple other template systems default to escaped and are generally better view layers precisely because they don’t have the kitchen sink of features TT does (I am a 20 year user of TT and I love how much it offers but it’s frequently a case of offering enough rope to hang yourself); and also because they are drastically faster. Anyway…
Template::Stash::AutoEscaping is probably the best choice now without rolling your own. I’ve never used it, I use Xslate for everything new, but Shlomi Fish is a conscientious hacker so I’d expect it to be right. TT hasn’t seen a lot of development in 10 years so older modules are generally going to be fine or easy to fix if they aren’t.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|