The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AnyEvent::XMPP::Ext::HTML - XEP-0071: XHTML-IM (Version 1.5) for AnyEvent::XMPP

VERSION

version 0.02

SYNOPSIS

    my $c = AnyEvent::XMPP::Connection->new(...);
    $c->add_extension(my $disco = AnyEvent::XMPP::Ext::Disco->new);
    $c->add_extension(AnyEvent::XMPP::Ext::HTML->new(disco => $disco));
    
    $c->send_message(
        body => "This is plain text; same as usual.",
        html => "This is <em>XHTML</em>!",
    );

DESCRIPTION

An implementation of XEP-0071: XHTML-IM for HTML-formatted messages.

METHODS

new

Creates a new extension handle. It takes an optional disco argument which is a AnyEvent::XMPP::Ext::Disco object for which this extension will be enabled.

init

Initialize the extension. This does not need to be called externally.

CAVEATS

HTML messages are not validated nor escaped, so it is your responsibility to use valid XHTML-IM tags and to close them properly.

AUTHOR

Charles McGarvey <ccm@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Charles McGarvey.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.