Utility functions for html::template::compiled
# import log() and stack() use HTML::Template::Compiled::Utils qw(:log); # import the escapign functions use HTML::Template::Compiled::Utils qw(:escape);
$self->stack;
For HTML::Template:Compiled developers, prints a stack trace to \s-1STDERR\s0.
md5($text)
If Digest::MD5 is installed, returns the md5_base64 for $text, otherwise returns the empty string.
$self->log(@msg)
For HTML::Template::Compiled developers, print log from @msg to \s-1STDERR\s0.
my $escaped_html = escape_html($raw_html);
HTML-escapes the input string (only &, ", single quotes, \*(C`<\*(C' and \*(C`\*(C'> and returns it;
my $escaped_html = escape_html_all($raw_html);
HTML-escapes the input string (with HTML::Entities) and returns it;
my $escaped_uri = escape_uri($raw_uri);
URI-escapes the input string and returns it;
my $escaped_js = escape_js($raw_js);
JavaScript-escapes the input string and returns it;
my $escaped_js = escape_ijson($raw_js);
JavaScript-escapes the input string except for the apostrophe and returns it, so it can be used within a \s-1JSON\s0 element.