Skip to content
This repository was archived by the owner on May 23, 2021. It is now read-only.
This repository was archived by the owner on May 23, 2021. It is now read-only.

notify-via-isms: URL encode when % is on the end of message - message sending fails #15

@kucert

Description

@kucert

My solution:

sub urlencode {
my $str = "@_";
$str =~ s/%([A-Fa-f\d]{2})/chr hex $1/eg; # decode first, there are new lines encoded by checkmk
$str =~ s/([^^A-Za-z0-9\-_.~])/ sprintf "%%%02X", ord $1 /eg; # encode also % character !!!
return $str;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions