GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTML::QUOTED (3)

.ds Aq ’

NAME

HTML::Quoted - extract structure of quoted HTML mail message

CONTENTS

SYNOPSIS



    use HTML::Quoted;
    my $html = ...;
    my $struct = HTML::Quoted->extract( $html );



DESCRIPTION

Parses and extracts quotation structure out of a HTML message. Purpose and returned structures are very similar to Text::Quoted.

SUPPORTED FORMATS

Variouse MUAs use quite different approaches for quoting in mails.

Some use blockquote tag and it’s quite easy to parse.

Some wrap text into p tags and add ’>’ in the beginning of the paragraphs.

Things gettign messier when it’s an HTML reply on plain text mail thread.

If <B>you found formatB> that is not supported then file a bug report via rt.cpan.org with as short as possible example. <B>Test fileB> is even better. Test file with patch is the best. Not obviouse patches without tests suck.

METHODS

    extract



    my $struct = HTML::Quoted->extract( $html );



Takes a string with HTML and returns array reference. Each element in the array either array or hash. For example:



    [
        { raw => Hi, },
        { raw => <div><br><div>On date X wrote:<br> },
        [
             { raw => <blockquote> },
             { raw => Hello, },
             { raw => <div>How are you?</div> },
             { raw => </blockquote> }
        ],
        ...
    ]



Hashes represent a part of the html. The following keys are meaningful at the moment:
o raw - raw HTML
o quoter_raw, quoter - raw and decoded (entities are converted) quoter if block is prefixed with quoting characters

    combine_hunks



  my $html = HTML::Quoted->combine_hunks( $arrayref_of_hunks );



Takes the output of extract and turns it back into HTML.

AUTHOR

Ruslan.Zakirov <ruz@bestpractical.com>

LICENSE

Under the same terms as perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTML::QUOTED (3) 2013-05-21

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.