This bug has really got me confused, mainly because it seems to have appeared, then got fixed and then appeared again.
That is, it got (hot)fixed for some of the afflicted… I was never abe to fix it.
The bug centers around a block of code contained in EE_Typography.php.
The first hot fix suggested to remove the curly brackets in the code.
Now, the code comments say it breaks if it outputs curly brackets…
Within the forum I am working on, there are posts that contain email addresses and these posts have no curly brackets whatsoever in them and I am still seeing the “JavaScript must be enabled to view this email address” error ...
Also why is there a period(.) preceding the echo lang statement in the first line? This gets output to the user for no apparent reason….
Build Date: 20120606
/* CAREFUL
*
* This javascript currently breaks in the forum if it outputs curly brackets.
* Test if you change it.
*
* Leave the comments in the while (--j >= 0) loop. They make sure that when
* the line breaks are removed EE doesn't see {if…
*
* Regex speed hat tip: <a href="http://blog.stevenlevithan.com/archives/faster-trim-javascript">http://blog.stevenlevithan.com/archives/faster-trim-javascript</a>
*/ ?>
<span>.<?php echo lang('encoded_email'); ?></span>[removed]
/*<![CDATA[*/
var out = '',
el = document.getElementsByTagName('span'),
l = ['<?php echo implode("','", $bit)?>'],
i = l.length,
j = el.length;
while (--i >= 0)
{
out += unescape(l[i].replace(/^\s\s*/, '&#'));
}
while (--j >= 0)
{/**/
if (el[j].getAttribute('<?php echo $span_marker ?>'))
{
el[j][removed] = out;
}
}
/*]]>*/
[removed]<?php
$buffer = ob_get_contents();
ob_end_clean();
return str_replace(array("\n", "\t"), '', $buffer);
}