summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-12-23 11:16:53 +0000
committerthomascube <thomas@roundcube.net>2006-12-23 11:16:53 +0000
commit853b2e734139aa7fcd97fd931803808bdad201bd (patch)
treec132e60c82eb2ff95a82fc220db08c91abfea573 /program
parent822e27617b42b8e4ceb3dbfcaedd76e3a3cb6f3f (diff)
Fixed little typos and improved CSS altering in HTML messages
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js2
-rw-r--r--program/steps/mail/func.inc14
-rw-r--r--program/steps/settings/save_identity.inc4
3 files changed, 10 insertions, 10 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 434f1f45b..50c6b58cc 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -671,7 +671,7 @@ function rcube_webmail()
if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)
{
if (props.mimetype == 'text/html')
- qstring += '&safe=1';
+ qstring += '&_safe=1';
this.attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment');
if (this.attachment_win)
{
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) . "<<str_replacement[$key]>>" . 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('/<<str_replacement\[([0-9]+)\]>>/e', "\$a_css_values[\\1]", $styles);
-
- // replace body definition because we also stripped off the <body> 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 <body> tag
+ $styles = preg_replace(array('/(^\s*<!--)|(-->\s*$)/', '/(^\s*|,\s*|\}\s*)([a-z0-9\._][a-z0-9\.\-_]*)/im', '/<<str_replacement\[([0-9]+)\]>>/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