Hello,
Thank you for your answer.
Here the code which I use.
<%encrypt_mails%>
-------------
sub {
my $in = $_[0];
my $strings = q|
a~097
b~098
c~099
d~100
e~101
f~102
g~103
h~104
i~105
j~106
k~107
l~108
m~109
n~110
o~111
p~112
q~113
r~114
s~115
t~116
u~117
v~118
w~119
x~120
y~121
z~122
1~049
2~050
3~051
4~052
5~053
6~054
7~055
8~056
9~057
0~048
&~038
~032
_~095
-~045
@~064
.~046
|;
my $back;
my @address = split //, $in; # cut the email address up into each charachter...
my @strings = split /\n/, $strings;
foreach (@address) {
my $next;
foreach my $s (@strings) {
next if $next == 1;
my ($char,$equiv) = split /~/, $s; # get the charachter, and its numerical equiv
if ($char eq $_) {
$char =~ s/\Q$char/$equiv/i;
$char = '&#' . $char . ';';
$back .= $char; # add the new replacement to $back
$next = 1;
}
}
}
return $back;
}
-------------
It gives the result for : mick@serveur.com
m ;i ;c ;k ;@ ;s ;e ;r ;v ;e ;u ;r ;. ;f ;r ;
<a href="mailto:m ;i ;c ;k ;@ ;s ;e ;r ;v ;e ;u ;r ;. ;f ;r ;">
You have an idea.
I do not manage to find my error.
Thank you for your assistance.
Mick
Thank you for your answer.
Here the code which I use.
<%encrypt_mails%>
-------------
sub {
my $in = $_[0];
my $strings = q|
a~097
b~098
c~099
d~100
e~101
f~102
g~103
h~104
i~105
j~106
k~107
l~108
m~109
n~110
o~111
p~112
q~113
r~114
s~115
t~116
u~117
v~118
w~119
x~120
y~121
z~122
1~049
2~050
3~051
4~052
5~053
6~054
7~055
8~056
9~057
0~048
&~038
~032
_~095
-~045
@~064
.~046
|;
my $back;
my @address = split //, $in; # cut the email address up into each charachter...
my @strings = split /\n/, $strings;
foreach (@address) {
my $next;
foreach my $s (@strings) {
next if $next == 1;
my ($char,$equiv) = split /~/, $s; # get the charachter, and its numerical equiv
if ($char eq $_) {
$char =~ s/\Q$char/$equiv/i;
$char = '&#' . $char . ';';
$back .= $char; # add the new replacement to $back
$next = 1;
}
}
}
return $back;
}
-------------
It gives the result for : mick@serveur.com
m ;i ;c ;k ;@ ;s ;e ;r ;v ;e ;u ;r ;. ;f ;r ;
<a href="mailto:m ;i ;c ;k ;@ ;s ;e ;r ;v ;e ;u ;r ;. ;f ;r ;">
You have an idea.
I do not manage to find my error.
Thank you for your assistance.
Mick