summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 17:53:13 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-09-29 17:53:13 +0000
commit3b151fc1adad6efc065b54073b7c13e652d2823c (patch)
tree58357e80c84806dc8d48903d7b6ea1e7beff6aa8 /roundcubemail/program
parent043b159256a721853b50631827690eeb842c844a (diff)
- Allow setting some washtml options from plugin (#1486578)
git-svn-id: https://svn.roundcube.net/trunk@4017 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/func.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index d7c65236b..4dd6d8b55 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/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;