From ad18d63cc15d7b0a77a5d90dc9f8bd7476b90c8d Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 5 Feb 2010 08:25:22 +0000 Subject: - Fix handling of extended mailto links (with params) (#1486354) --- program/steps/mail/func.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/steps') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 98653087f..e9adc1513 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1148,12 +1148,12 @@ function rcmail_alter_html_link($matches) $attrib['href'] = "./bin/modcss.php?u=" . urlencode($attrib['href']) . "&c=" . urlencode($GLOBALS['rcmail_html_container_id']); $end = ' />'; } - else if (preg_match("/^mailto:$EMAIL_ADDRESS_PATTERN/i", $attrib['href'], $mailto)) { + else if (preg_match('/^mailto:'.$EMAIL_ADDRESS_PATTERN.'(\?[^"\'>]+)?/i', $attrib['href'], $mailto)) { $attrib['href'] = $mailto[0]; $attrib['onclick'] = sprintf( "return %s.command('compose','%s',this)", JS_OBJECT_NAME, - JQ($mailto[1])); + JQ($mailto[1].$mailto[2])); } else if (!empty($attrib['href']) && $attrib['href'][0] != '#') { $attrib['target'] = '_blank'; -- cgit v1.2.3