Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/usr/share/doc/perl-HTML-Restrict/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/doc/perl-HTML-Restrict/examples/naughty-strings.pl
#!/usr/bin/perl

=head1 DESCRIPTION

This script:

    * processes the Big List of Naughty Strings (or some version of it)
    * prints it to a file
    * tries to open this file in a browser

This is helpful for finding naughty strings which might get turned into
something clickable.  A visual scan is required.

=cut

use strict;
use warnings;

use Browser::Open  qw( open_browser );
use Data::BLNS     qw( get_naughty_strings );
use HTML::Restrict ();
use Path::Tiny     ();

my $hr = HTML::Restrict->new;

my @clean = map { $_ . '<br>' }
    grep { $_ } map { $hr->process($_) } get_naughty_strings;

my $file = Path::Tiny->tempfile( CLEANUP => 1, SUFFIX => '.html', );
$file->spew_raw( '<body>', @clean, '</body>' );
open_browser( $file->stringify );

Hry