EJS::Template::Util - Utility for EJS::Template
my $original_ref = \'some text'; my $modified_ref = clean_text_ref($original_ref, $encode_utf8, $sanitize_utf8, $force_untaint); # where the last three arguments are boolean values # to indicate whether each conversion is required.
It takes a reference to the text as the first argument, and returns a reference to the modified text, of if no conversion is necessary, the original reference is returned.
Indicates the text needs to be a utf8-encoded string, where the utf8 flag has to be turned off.
Indicates the text cannot contain any invalid utf8 characters. The conversion is done by applying
Encode::decode_utf8() and then