1HTTP::Proxy::BodyFilterU:s:ehrtmClotnetxrti(b3u)ted PerlHTDToPc:u:mPernotxayt:i:oBnodyFilter::htmltext(3)
2
3
4

NAME

6       HTTP::Proxy::BodyFilter::htmltext - A filter to transmogrify HTML text
7

SYNOPSIS

9           use HTTP::Proxy::BodyFilter::tags;
10           use HTTP::Proxy::BodyFilter::htmltext;
11
12           # could it be any simpler?
13           $proxy->push_filter(
14               mime     => 'text/html',
15               response => HTTP::Proxy::BodyFilter::tags->new,
16               response => HTTP::Proxy::BodyFilter::htmltext->new(
17                   sub { tr/a-zA-z/n-za-mN-ZA-M/ }
18               )
19           );
20

DESCRIPTION

22       The HTTP::Proxy::BodyFilter::htmltext is a filter spawner that calls
23       the callback of your choice on any HTML text (outside "<script>" and
24       "<style>" tags, and entities).
25
26       The subroutine should modify the content of $_ as it sees fit.  Simple,
27       and terribly efficient.
28

METHODS

30       The filter defines the following methods, called automatically:
31
32       init()
33           Ensures that the filter is initialised with a CODE reference.
34
35       begin()
36           Per page parser initialisation.
37
38       filter()
39           A simple HTML parser that runs the given callback on the text con‐
40           tained in the HTML data. Please look at HTTP::Proxy::BodyFil‐
41           ter::htmlparser if you need something more elaborate.
42

SEE ALSO

44       HTTP::Proxy, HTTP::Proxy::BodyFilter, HTTP::Proxy::BodyFilter::html‐
45       parser.
46

AUTHOR

48       Philippe "BooK" Bruhat, <book@cpan.org>.
49
51       Copyright 2003-2005, Philippe Bruhat.
52

LICENSE

54       This module is free software; you can redistribute it or modify it
55       under the same terms as Perl itself.
56
57
58
59perl v5.8.8                       2006-09-0H4TTP::Proxy::BodyFilter::htmltext(3)
Impressum