Skip to content
Snippets Groups Projects
Commit c8e5fdec authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[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
parent 29ef39fc
No related branches found
No related tags found
No related merge requests found
...@@ -142,9 +142,11 @@ function unl_tidy($string) { ...@@ -142,9 +142,11 @@ function unl_tidy($string) {
'tidy-mark' => false, 'tidy-mark' => false,
); );
// Prevent Tidy from trying to move <script> to the head if it is the first thing // 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' || substr(trim($string), 0, 4) == '<!--') { if (strtolower(substr(trim($string), 0, 7)) == '<script' ||
$string = "&nbsp; <!-- Tidy: Start field with something other than script or comment to remove this -->\n" . $string; 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'); $tidy->parseString($string, $options, 'utf8');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment