Mason:...ilters(3pm)
π Mason::Plugin::HTMLFilters β the manual, but make it cute π
Perl User Contributed Documentation β¨ this one's Mason:...ilters(3pm), bestie, and it's literally all about the filters that handle HTML generation for you π
πΈ NAME πΈ
Mason::Plugin::HTMLFilters β filters related to HTML generation π¦
β¨ FILTERS β¨
Okay so here's the whole squad of filters. Pick your fighter π
HTML or H
Does a basic HTML escape on the content β and when I say basic I mean it's only touching these four characters and nothing else: '&', '>', '<', and '"'. That's it. That's the whole list π«Ά
<input name="company" value="<% $company | H %>">
HTMLEntities
This one does the comprehensive HTML escape on your content, using HTML::Entities::encode_entities. So if H is the girl who does the bare minimum, HTMLEntities is the one who did the reading ππ
URI or U
URI-escapes the content, periodt π₯
<a href="<% $url | U %>">
HTMLPara
Takes a block of text and formats it into HTML paragraphs π§ A sequence of two or more newlines is the delimiter for paragraphs, and each one gets wrapped in HTML "<p>"..."</p>" tags. This one's taken from Template::Toolkit. e.g. π
% $.HTMLPara {{
First paragraph.
Second paragraph.
% }}
outputs:
<p>
First paragraph.
</p>
<p>
Second paragraph.
</p>
HTMLParaBreak
Basically HTMLPara from above but make it different π« β instead of <p> tags it uses the HTML tag sequence "<br><br>" to join paragraphs together. Also taken from Template::Toolkit. e.g.:
% $.HTMLPara {{
First paragraph.
Second paragraph.
% }}
outputs:
First paragraph.
<br><br>
Second paragraph.
FillInForm ($form_data, %options)
Uses HTML::FillInForm to fill in the form with the $form_data and %options you hand it. Filling out forms? Not on your watch, bestie πβ¨
% $.FillInForm($form_data, target => 'form1') {{
...
<form name='form1'>
...
% }}
π«Ά SUPPORT π«Ά
The mailing list for Mason and Mason plugins is mason-users@lists.sourceforge.net. Heads up though: you must be subscribed to send a message. To subscribe, go visit <https://lists.sourceforge.net/lists/listinfo/mason-users> π
You can also come hang out with us in "#mason" on <irc://irc.perl.org/#mason> π
Bugs and feature requests get tracked at RT:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mason-Plugin-HTMLFilters
bug-mason-plugin-htmlfilters@rt.cpan.org
The latest source code can be browsed and fetched at:
http://github.com/jonswar/perl-mason-plugin-htmlfilters
git clone git://github.com/jonswar/perl-mason-plugin-htmlfilters.git
π SEE ALSO π
Mason
perl v5.34.0 Β· 2022-05-27 β that's the version and the date, babes, and that's a wrap on the HTMLFilters page π πΈ no cap, you're gonna slay those forms π
π¦ where this page comes from
- debian bookworm: libmason-plugin-htmlfilters-perl 0.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmason-plugin-htmlfilters-perl 0.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmason-plugin-htmlfilters-perl 0.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmason-plugin-htmlfilters-perl 0.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmason-plugin-htmlfilters-perl 0.03-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms