Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2019-12-18 13:54:20 +0300
committerAleksander Machniak <alec@alec.pl>2019-12-18 13:54:20 +0300
commit9bb95471bf73ed623d68e969d9864ac988f83ee4 (patch)
treef03abbce1353d8c9e102417367e113226e109d21 /program
parent226097fc3fe87578e9bd987c18181524096723ba (diff)
parent52caed0d66532d167e3acf1d11237b3c1d7b451a (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/func.inc10
1 files changed, 4 insertions, 6 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index ae396cff1..ed75b2d8a 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -839,12 +839,10 @@ function rcmail_wash_html($html, $p, $cid_replaces = array())
// washtml's DOMDocument methods cannot work without that
$meta = '<meta charset="'.RCUBE_CHARSET.'" />';
- // remove old meta tag and add the new one, making sure
- // that it is placed in the head (#1488093)
- $html = preg_replace('/<meta[^>]+charset=[a-z0-9_"-]+[^>]*>/Ui', $meta, $html, -1, $rcount);
- if (!$rcount) {
- $html = preg_replace('/(<head[^>]*>)/Ui', '\\1'.$meta, $html, -1, $rcount);
- }
+ // remove old meta tag and add the new one, making sure that it is placed in the head (#3510, #7116)
+ $html = preg_replace('/<meta[^>]+charset=[a-z0-9_"-]+[^>]*>/Ui', '', $html);
+ $html = preg_replace('/(<head[^>]*>)/Ui', '\\1'.$meta, $html, -1, $rcount);
+
if (!$rcount) {
// Note: HTML without <html> tag may still be a valid input (#6713)
if (($pos = stripos($html, '<html')) === false) {