summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-08 09:05:35 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-08 09:05:35 +0100
commitfb53c809a632a0f4122f0ef76cb8958a4ed7f6e1 (patch)
treecce86d3228838b1ad4886052f6bb2a6f22da4855 /program/steps/mail/func.inc
parent91c0990385b310bfbae0bbb77489584cb2bdfa6d (diff)
Fix AREA links handling (#1488792)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 10829d514..f128a3834 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1294,7 +1294,7 @@ function rcmail_html4inline($body, $container_id, $body_id='', &$attributes=null
// modify HTML links to open a new window if clicked
$GLOBALS['rcmail_html_container_id'] = $container_id;
- $body = preg_replace_callback('/<(a|link)\s+([^>]+)>/Ui', 'rcmail_alter_html_link', $body);
+ $body = preg_replace_callback('/<(a|link|area)\s+([^>]+)>/Ui', 'rcmail_alter_html_link', $body);
unset($GLOBALS['rcmail_html_container_id']);
$body = preg_replace(array(
@@ -1407,7 +1407,11 @@ function rcmail_alter_html_link($matches)
$attrib['target'] = '_blank';
}
- return "<$tag" . html::attrib_string($attrib, array('href','name','target','onclick','id','class','style','title','rel','type','media')) . $end;
+ // allowed attributes for a|link|area tags
+ $allow = array('href','name','target','onclick','id','class','style','title',
+ 'rel','type','media','alt','coords','nohref','hreflang','shape');
+
+ return "<$tag" . html::attrib_string($attrib, $allow) . $end;
}