From 24f3742ec24fd69be7fc4de8e8220f200d49fb47 Mon Sep 17 00:00:00 2001 From: Eric Rasmussen <eric@unl.edu> Date: Wed, 4 Apr 2012 19:25:55 +0000 Subject: [PATCH] [gh-308] Merging test into staging git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1522 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/includes/common.php | 6 +++--- sites/all/modules/unl/includes/unl.admin.inc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sites/all/modules/unl/includes/common.php b/sites/all/modules/unl/includes/common.php index 8ad88591..cb1a01ca 100644 --- a/sites/all/modules/unl/includes/common.php +++ b/sites/all/modules/unl/includes/common.php @@ -142,11 +142,11 @@ function unl_tidy($string) { 'tidy-mark' => false, ); - // 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) == '<!--') { + // Add to prevent Tidy from removing script or comment if it is the first thing + if (strtolower(substr(trim($string), 0, 7)) == '<script' || substr(trim($string), 0, 4) == '<!--') { $statement = ''; if (substr(trim($string), 0, 9) !== '<!-- Tidy') { - $statement = "<!-- Tidy: Start field with something other than script , style, or comment to remove this -->\n"; + $statement = "<!-- Tidy: Start field with something other than script or comment to remove this -->\n"; } $string = " " . $statement . $string; } diff --git a/sites/all/modules/unl/includes/unl.admin.inc b/sites/all/modules/unl/includes/unl.admin.inc index 258adb91..1065e992 100644 --- a/sites/all/modules/unl/includes/unl.admin.inc +++ b/sites/all/modules/unl/includes/unl.admin.inc @@ -26,7 +26,7 @@ function unl_config($form, &$form_state) { $form['root']['unl_tidy'] = array( '#type' => 'checkbox', '#title' => 'Clean up text area HTML', - '#description' => 'Tidy will be used to process HTML in text areas on the node edit form.', + '#description' => 'Tidy will be used to process HTML in text areas on the node edit form. (This will remove any <style> tags.)', '#default_value' => variable_get('unl_tidy'), ); } -- GitLab