I add to change the fix to make it backward compatible. GetEmail (Framework r121 Framework.Function.php) function GetEmail($Email, $LinkText = '') { if ($Email == '') { return ' '; } else { $EmailParts = explode('@', $Email); if (count($EmailParts) == 2) { $ScriptID = 'WriteEmail_' . rand(); return " <script id=\"".$ScriptID."\" type=\"text/javascript\"> \r\nWriteEmail('".$EmailParts[1]."', '".$EmailParts[0]."', '".$LinkText."', '".$ScriptID."'); \r\n</script>"; } else { // Failsafe return '<a href="mailto:'.$Email.'">'.($LinkText==''?$Email:$LinkText).'</a>'; } } }
WriteEmail (Vanilla r600 js/global.js) function WriteEmail(d, n, v, i) { if (document.createElement && document.getElementById) { var a, p, t; //Create link a = document.createElement('a'); a.href = 'mai'+'lto:'+n+'@'+d; //Create text link v = v || n+"@"+d; t = document.createTextNode(v); a.appendChild(t); //Append link p = document.getElementById(i).parentNode; if (p) { p.appendChild(a); } } }
It has been tested on windows Vista in IE7, FF2, Opera9.23 and Safari 3.
Whoops, overlooked that test case. Does anybody even have a mac to test on?... could always put it online and get Wanderer to put it through its paces.
I tested it ok in Safari 2 and 3 on OS X. I think it deserve the fixed state. We might re-open it latter to add a stronger hiding algorithm. As Vanilla spreads, it's very easy to write a parser for such two strings collation. Currently, I'm using ajax request to load email on request.