From 853b2e734139aa7fcd97fd931803808bdad201bd Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 23 Dec 2006 11:16:53 +0000 Subject: Fixed little typos and improved CSS altering in HTML messages --- program/steps/mail/func.inc | 14 +++++++------- program/steps/settings/save_identity.inc | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'program/steps') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 57f20e57a..257502e15 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1274,13 +1274,13 @@ function rcmail_mod_css_styles($source, $container_id) $source = substr($source, 0, $pos+1) . "<>" . substr($source, $pos2, strlen($source)-$pos2); $last_pos = $pos+2; } - - $styles = preg_replace('/(^\s*|,\s*)([a-z0-9\._][a-z0-9\.\-_]*)/im', "\\1#$container_id \\2", $source); - $styles = preg_replace('/<>/e', "\$a_css_values[\\1]", $styles); - - // replace body definition because we also stripped off the tag - $styles = preg_replace("/$container_id\s+body/i", "$container_id div.rcmBody", $styles); - + + // remove html commends and add #container to each tag selector. + // also replace body definition because we also stripped off the tag + $styles = preg_replace(array('/(^\s*\s*$)/', '/(^\s*|,\s*|\}\s*)([a-z0-9\._][a-z0-9\.\-_]*)/im', '/<>/e', "/$container_id\s+body/i"), + array('', "\\1#$container_id \\2", "\$a_css_values[\\1]", "$container_id div.rcmBody"), + $source); + return $styles; } diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index 60a6855f0..a127ca07e 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -139,12 +139,12 @@ else { // show error message show_message('errorsaving', 'error'); - rcmail_overwrite_action('edit-identitiy'); + rcmail_overwrite_action('edit-identity'); } } // go to next step -rcmail_overwrite_action($_POST['_framed'] ? 'edit-identitiy' : 'identities'); +rcmail_overwrite_action($_POST['_framed'] ? 'edit-identity' : 'identities'); ?> \ No newline at end of file -- cgit v1.2.3