Revision 792
Added by doc over 16 years ago
trunk/CHANGELOG | ||
---|---|---|
14 | 14 |
02-Apr-2008 Matthias Gallas |
15 | 15 |
# fixed bug with registration of users are not added to signup group |
16 | 16 |
02-Apr-2008 Christian Sommer |
17 |
# added handling of missing characters to mailto encryption routines |
|
17 | 18 |
! some code clean-up in News module |
18 | 19 |
! fixed some layout issues with Form module (combination with Output-filter) |
19 | 20 |
! fixed layout issue with optional subject/body text of encrypted mailto links |
trunk/wb/modules/output_filter/filter-routines.php | ||
---|---|---|
167 | 167 |
// encrypt the email using an adapted Caesar cipher |
168 | 168 |
$encrypted_email = ""; |
169 | 169 |
for($i = strlen($email_address) -1; $i > -1; $i--) { |
170 |
if(in_array($email_address[$i], array('F', 'Z', 'X', 'K'))) {
|
|
170 |
if(preg_match('#[FZXK0-9]#', $email_address[$i], $characters)) {
|
|
171 | 171 |
$encrypted_email .= $email_address[$i]; |
172 | 172 |
} else { |
173 | 173 |
$encrypted_email .= chr((ord($email_address[$i]) -97 + $shift) % 26 + 97); |
trunk/wb/modules/output_filter/js/mdcr.js | ||
---|---|---|
8 | 8 |
|
9 | 9 |
function sdcr(a,f) { |
10 | 10 |
var b = a.charCodeAt(a.length-1) -97; |
11 |
var c=""; var e; |
|
11 |
var c=""; var e; var g;
|
|
12 | 12 |
|
13 | 13 |
for(var d=a.length-2; d>-1; d--) { |
14 | 14 |
if(a.charCodeAt(d) < 97) { |
15 |
if(a.charCodeAt(d) == 70) { c+=String.fromCharCode(64); } |
|
16 |
if(a.charCodeAt(d) == 90) { c+=String.fromCharCode(46); } |
|
17 |
if(a.charCodeAt(d) == 88) { c+=String.fromCharCode(95); } |
|
18 |
if(a.charCodeAt(d) == 45) { c+=String.fromCharCode(45); } |
|
15 |
switch(a.charCodeAt(d)) { |
|
16 |
case 70: g=64; break; |
|
17 |
case 90: g=46; break; |
|
18 |
case 88: g=95; break; |
|
19 |
case 45: g=45; break; |
|
20 |
default: g=a.charCodeAt(d); break; |
|
21 |
} |
|
22 |
c+=String.fromCharCode(g) |
|
19 | 23 |
} else { |
20 | 24 |
e=(a.charCodeAt(d) - 97 - b) % 26; |
21 | 25 |
e+=(e<0 || e>25) ? +26 : 0; |
Also available in: Unified diff
added handling of missing characters to mailto encryption routines