diff --git a/sites/all/modules/unl/includes/common.php b/sites/all/modules/unl/includes/common.php index dcf7ce242f95c1ef6796ad45d52aa5a3a0d7146b..b90d3d1726ab2bcdec0ea03f7f022bab8e5a6221 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 = " <!-- 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 = " <!-- Tidy: Start field with something other than script , style, or comment to remove this -->\n" . $string; } $tidy->parseString($string, $options, 'utf8');