AnyEvent-XMPP
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Util.pm view on Meta::CPAN
not defined $res
}
=item B<filter_xml_chars ($string)>
This function removes all characters from C<$string> which
are not allowed in XML and returns the new string.
=cut
sub filter_xml_chars($) {
my ($string) = @_;
$string =~ s/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFFFF}]+//g;
$string
}
=item B<filter_xml_attr_hash_chars ($hashref)>
This runs all values of the C<$hashref> through C<filter_xml_chars> (see above)
and changes them in-place!
t/z_04_presence.t view on Meta::CPAN
my $roster_push = 0;
my $received_subscribe = 0;
my $mutual_subscribe = 0;
my $subscriptions = 0;
my $unsubscriptions = 0;
my $dest_src_subs = '';
my $src_dest_subs = '';
sub jid_user($) { my ($u) = split_jid $_[0]; $u }
$C->reg_cb (
two_accounts_ready => sub {
my ($C) = @_;
$src = prep_bare_jid $cl->{jid};
$dest = prep_bare_jid $cl->{jid2};
$cl->{acc}->connection->get_roster ()->new_contact (
$cl->{jid2}, undef, "friend", sub {
my ($con, $err) = @_;
( run in 0.725 second using v1.01-cache-2.11-cpan-65fba6d93b7 )