sure thing:

this is just a sample of what i do, but i have a loop and fill a hash with text that may contain HTML, and then i push the reference of the hash to an array and then load the HTML::Template with that array, though when the loop in the .tmpl file is executed it will not display the text as escaped HTML text on the server... but it does on win32.
my (@tmp,$template); for (0 .. 4) { my ($test,$str); $str = "test   text $_"; $test{'TRY'} = escapeHTML($str); push (@tmp,\%test); } $template->param(TMP_LOOP => \@tmp);

In reply to Re: Re: escapeHTML by primus
in thread escapeHTML by primus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.