Not signed in (Sign In)
 
Aug 22nd 2007
 
http://lussumo.com/community/discussion/4598/documentwrite-is-invalid-with-xhtml-doctypes/

Maybe tonight I'll get around to fixing bugs, rather than just searching them out :-)
 
Aug 25th 2007
 
I just submit a fix.
Vanilla r598-599
Framework r120

It has been tested on windows vista in IE7, FF2, Opera9.23 and Safari 3.
It still need to be tested on windows XP in IE6 and on osX in Safari 2.
 
Aug 27th 2007 edited
 
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.

Update: Tested on Windows XP in IE5.5 and IE6
 
Aug 29th 2007
 
Did someone tested it in Safari 2 before closing this issue?
 
Aug 29th 2007
 
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.
 
Aug 29th 2007 edited
 
Mark and Max at least
 
Sep 5th 2007
 
I have a powerbook with webkit+Saf2 and a Macbook with webkit+Saf3.
I'll try to test it before Mark next release on Sept. 10
 
Sep 7th 2007
 
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.
 
Sep 7th 2007
 
Thanks Max!

Issue information

  • 3
  • No assigned user

    No assigned user

     

  • Resolved
  • Low
  • Bug

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.