I installed TinyMCE and EsayLink (easylink-5.x-1.x-dev.tar.gz) on a fresh Drupal 5.1 install.

I tested EasyLink on both MSIE6 and MSIE7 now. The EasyLink button appears in MSIE6, but it does not show up in MSIE7.

Cheers,

Olivier

Comments

ShutterFreak’s picture

Status: Active » Needs review

I received a patch for easylink.module in reply to my post on the Drupal forums, which does the job:

// Check if link is a pager link or not.  Only replace non-pager links
function check_pager($matches){
	foreach ($matches as $match){
		if (preg_match('/.*\?page=/', $match)||preg_match('/.*\?sort=/', $match)){
			return $match;
		} else {
			// [BTO] Buggy code in MSIE7/FireFox (2 lines)
			// $search = '/<a href="(.*?)">/i';
			// $replace = "<a href='javascript:void(0);' onClick=addLink('$1')>";
			$search = '/<a href="(.*?)"[^>]*>/i';
			$replace = '<a href="javascript:void(0);" onClick="addLink(\'$1\')">';
			return preg_replace($search, $replace, $match);
		}
	}
}
ShutterFreak’s picture

Sorry for the noise - here's the link to the node in the forum: http://drupal.org/node/146732

Anonymous’s picture

The patch has been commited to 5.x-1.x-dev thanks for the help Jose!

Anonymous’s picture

Status: Needs review » Closed (fixed)