summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-11-03 00:39:48 -0500
committerDavid Rothstein <drothstein@gmail.com>2014-11-03 00:39:48 -0500
commit62e874b348fe64490952a12f419164e26ea98d21 (patch)
tree1832d4d5e6c6077c54813a1dc31d400f8f80758a /includes/common.inc
parent0c8dc6ea062cd7595a7b6fbd02fb0f0294ccecef (diff)
downloadbrdo-62e874b348fe64490952a12f419164e26ea98d21.tar.gz
brdo-62e874b348fe64490952a12f419164e26ea98d21.tar.bz2
Issue #1071818 by JeremyFrench, nod_, Cottser, gielfeldt, xjm, anthbel, reglogge, NROTC_Webmaster, kristofferwiklund, lliss, sun | sepgil: Fixed Lazy-loading CSS fails in IE.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index e7e293917..1bfff345b 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -3474,7 +3474,11 @@ function drupal_pre_render_styles($elements) {
$import_batch = array_slice($import, 0, 31);
$import = array_slice($import, 31);
$element = $style_element_defaults;
- $element['#value'] = implode("\n", $import_batch);
+ // This simplifies the JavaScript regex, allowing each line
+ // (separated by \n) to be treated as a completely different string.
+ // This means that we can use ^ and $ on one line at a time, and not
+ // worry about style tags since they'll never match the regex.
+ $element['#value'] = "\n" . implode("\n", $import_batch) . "\n";
$element['#attributes']['media'] = $group['media'];
$element['#browsers'] = $group['browsers'];
$elements[] = $element;