/usr/bin/html2xhtml is in libhtml-html5-parser-perl 0.301-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
## skip Test::Tabs
use 5.010;
use HTML::HTML5::Parser;
my $input = shift // '-';
my $output = shift // '-';
my $parser = HTML::HTML5::Parser->new;
my $dom = ($input eq '-')
? $parser->parse_string(do { local $/ = <STDIN> })
: $parser->parse_file($input);
if ($output eq '-')
{
print $dom->toString;
}
else
{
open my($fh), '>:encoding(UTF-8)', $output;
print $fh $dom->toString;
close $fh;
}
|