Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.105
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
perl-HTML-Parser /
eg /
Delete
Unzip
Name
Size
Permission
Date
Action
hanchors
1.17
KB
-rw-r--r--
2021-03-04 18:05
hbody
729
B
-rw-r--r--
2021-03-04 18:05
hdisable
740
B
-rw-r--r--
2021-03-04 18:05
hdump
708
B
-rw-r--r--
2021-03-04 18:05
hform
2.44
KB
-rw-r--r--
2021-03-04 18:05
hlc
717
B
-rw-r--r--
2021-03-04 18:05
hrefsub
3
KB
-rw-r--r--
2021-03-04 18:05
hstrip
1.73
KB
-rw-r--r--
2021-03-04 18:05
htext
612
B
-rw-r--r--
2021-03-04 18:05
htextsub
936
B
-rw-r--r--
2021-03-04 18:05
htitle
461
B
-rw-r--r--
2021-03-04 18:05
Save
Rename
#!/usr/bin/perl use strict; use warnings; use HTML::Parser (); use HTML::Entities qw(encode_entities); sub disable_tags_but { my ($text, $allowed_tags) = @_; my @text; my %allowed_tag = map { $_ => 1 } @{$allowed_tags || []}; my $tag_h = sub { my ($tag, $text) = @_; $text = encode_entities($text, "<") unless $allowed_tag{$tag}; push(@text, $text); }; HTML::Parser->new( start_h => [$tag_h, 'tagname, text'], end_h => [$tag_h, 'tagname, text'], default_h => [\@text, '@{text}'], )->parse($text)->eof; return join("", @text); } # # Test it # print disable_tags_but(<<EOT, [qw(a br)]) unless caller; Test <foo> <a href="...">...</a> </bar> EOT