summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-05 02:48:39 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-05 02:48:39 +0000
commit1e23b91bc886b30e7a64c7c118a79071c706e39c (patch)
treea2172e7d3a286508ab738db0971657f7b545b3bf /includes
parent93eb8b341392b5a04488d0d3a0a9d8136da6a2cf (diff)
downloadbrdo-1e23b91bc886b30e7a64c7c118a79071c706e39c.tar.gz
brdo-1e23b91bc886b30e7a64c7c118a79071c706e39c.tar.bz2
#472820 by rfay, Rob Loach, and catch: Fixed improper whitespace removal/invalid CSS from drupal_load_stylesheet_content() (with tests).
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index ba1218d46..450777f3d 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -3062,8 +3062,7 @@ function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
// Perform some safe CSS optimizations.
$contents = preg_replace('<
\s*([@{}:;,]|\)\s|\s\()\s* | # Remove whitespace around separators, but keep space around parentheses.
- /\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks.
- [\n\r] # Remove line breaks.
+ /\*([^*\\\\]|\*(?!/))+\*/ # Remove comments that are not CSS hacks.
>x', '\1', $contents);
}