From c8e5fdec0f94f9c5e4167e648f39b39b9ff93edd Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <eric@unl.edu>
Date: Mon, 2 Apr 2012 19:10:42 +0000
Subject: [PATCH] [gh-307] Merging test into staging -c1501

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1502 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 sites/all/modules/unl/includes/common.php | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sites/all/modules/unl/includes/common.php b/sites/all/modules/unl/includes/common.php
index dcf7ce24..b90d3d17 100644
--- a/sites/all/modules/unl/includes/common.php
+++ b/sites/all/modules/unl/includes/common.php
@@ -142,9 +142,11 @@ function unl_tidy($string) {
       'tidy-mark' => false,
     );
 
-    // Prevent Tidy from trying to move <script> to the head if it is the first thing
-    if (strtolower(substr(trim($string), 0, 7)) == '<script' || substr(trim($string), 0, 4) == '<!--') {
-      $string = "&nbsp; <!-- Tidy: Start field with something other than script or comment to remove this -->\n" . $string;
+    // Prevent Tidy from trying to move <script>,<style>,comments to the head if it is the first thing
+    if (strtolower(substr(trim($string), 0, 7)) == '<script' ||
+        strtolower(substr(trim($string), 0, 6)) == '<style' ||
+        substr(trim($string), 0, 4) == '<!--') {
+      $string = "&nbsp; <!-- Tidy: Start field with something other than script , style, or comment to remove this -->\n" . $string;
     }
 
     $tidy->parseString($string, $options, 'utf8');
-- 
GitLab