diff options
author | alecpl <alec@alec.pl> | 2010-09-29 17:53:13 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2010-09-29 17:53:13 +0000 |
commit | 33da0b48b343609a46e200afc814d75fba589057 (patch) | |
tree | 422a55197e63b28a7b190642d31d8b18f144dc23 /program/steps | |
parent | 5c461bada970c336616b0c03c9036f89cab21d0c (diff) |
- Allow setting some washtml options from plugin (#1486578)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/func.inc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index d7c65236b..4dd6d8b55 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -695,11 +695,21 @@ function rcmail_wash_html($html, $p = array(), $cid_replaces) $wash_opts['html_attribs'] = array('rel','type'); } + // overwrite washer options with options from plugins + if (isset($p['html_elements'])) + $wash_opts['html_elements'] = $p['html_elements']; + if (isset($p['html_attribs'])) + $wash_opts['html_attribs'] = $p['html_attribs']; + + // initialize HTML washer $washer = new washtml($wash_opts); - $washer->add_callback('form', 'rcmail_washtml_callback'); + + if (!$p['skip_washer_form_callback']) + $washer->add_callback('form', 'rcmail_washtml_callback'); // allow CSS styles, will be sanitized by rcmail_washtml_callback() - $washer->add_callback('style', 'rcmail_washtml_callback'); + if (!$p['skip_washer_style_callback']) + $washer->add_callback('style', 'rcmail_washtml_callback'); $html = $washer->wash($html); $REMOTE_OBJECTS = $washer->extlinks; |