File: direct.pl

package info (click to toggle)
libhtml-stripscripts-perl 1.06-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 492 kB
  • sloc: perl: 1,004; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (5)
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
28
29
30
#!/usr/bin/perl
use strict;
use warnings;
use blib;

use HTML::StripScripts();

my $f = HTML::StripScripts->new({ Context        => 'Flow' });

$f->input_start_document;
$f->input_start('<ul>');

$f->input_start('<li>');
$f->input_text ('List Item 1');
$f->input_end  ('</li>');

$f->input_start('<li>');
$f->input_text ('List Item 2');
$f->input_end  ('</li>');

## Send bad tag
$f->input_end  ('</li>');

$f->input_end  ('</ul>');
$f->input_end_document;

print "\n\nFiltered HTML:\n\n  "
      .$f->filtered_document
      ."\n\n";