The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MojoMojo::Formatter::Scrub - Scrub user HTML 1 =head1 DESCRIPTION

This formatter makes sure only a safe range of tags are allowed, using HTML::Scrubber; It also makes sure all tags are balaced, using XML::Clean.

METHODS

format_content_order

Format order can be 1-99. The Scrub formatter runs on 7 in order to catch direct user input, but trusts all subsequently ran plugins to not output unsafe HTML.

format_content

calls the formatter. Takes a ref to the content as well as the context object.

SEE ALSO

MojoMojo,Module::Pluggable::Ordered,XML::Clean,HTML::Scrubber

AUTHORS

Marcus Ramberg <mramberg@cpan.org>

LICENSE

This module is licensed under the same terms as Perl itself.