aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2010-07-24 21:02:34 +0000
committerrub <rub@piwigo.org>2010-07-24 21:02:34 +0000
commit8ce85643a61e2c896204bc05b2097a375e07d0f3 (patch)
treeed3441aaad210bce00d62355a2df90a40e2bc1e7 /include
parent1448b42df0e076d09e8eb6c8bf9c8cebd212596a (diff)
merge -c6705 from branch 2.1 to trunk
Feature 0001778: Thumbnails missing on NBM Fix move_ccs_rules_to_body function git-svn-id: http://piwigo.org/svn/trunk@6706 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_mail.inc.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 83e7f0b91..b720a1eaf 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -760,22 +760,23 @@ function move_ccs_rules_to_body($content)
$selectors[$select][] = $style;
}
}
+
foreach ($selectors as $selector => $style)
{
if (!preg_match('/^(#|\.|)([A-Za-z0-9_-]*)$/', $selector, $matches))
{
- $unknow_selectors .= $selector.' {'.implode('; ', $style).";}\n";
+ $unknow_selectors .= $selector.' {'.implode(";\n", $style).";}\n";
}
else switch ($matches[1])
{
case '#':
- $content = preg_replace('|id="'.$matches[2].'"|', 'id="'.$matches[2].'" style="'.implode('; ', $style).';"', $content);
+ $content = preg_replace('|id="'.$matches[2].'"|', 'id="'.$matches[2].'" style="'.implode(";\n", $style).";\"\n", $content);
break;
case '.':
- $content = preg_replace('|class="'.$matches[2].'"|', 'class="'.$matches[2].'" style="'.implode('; ', $style).';"', $content);
+ $content = preg_replace('|class="'.$matches[2].'"|', 'class="'.$matches[2].'" style="'.implode(";\n", $style).";\"\n", $content);
break;
default:
- $content = preg_replace('#<'.$matches[2].'( |>)#', '<'.$matches[2].' style="'.implode('; ', $style).';"$1', $content);
+ $content = preg_replace('#<'.$matches[2].'( |>)#', '<'.$matches[2].' style="'.implode(";\n", $style).";\"\n$1", $content);
break;
}
}