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

[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
parent 720ff498
No related branches found
No related tags found
No related merge requests found
...@@ -142,11 +142,11 @@ function unl_tidy($string) { ...@@ -142,11 +142,11 @@ function unl_tidy($string) {
'tidy-mark' => false, 'tidy-mark' => false,
); );
// Prevent Tidy from trying to move <script>,<style>,comments to the head if it is the first thing // Add &nbsp; to prevent Tidy from removing script or comment 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) == '<!--') { if (strtolower(substr(trim($string), 0, 7)) == '<script' || substr(trim($string), 0, 4) == '<!--') {
$statement = ''; $statement = '';
if (substr(trim($string), 0, 9) !== '<!-- Tidy') { 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 = "&nbsp;" . $statement . $string; $string = "&nbsp;" . $statement . $string;
} }
......
...@@ -26,7 +26,7 @@ function unl_config($form, &$form_state) { ...@@ -26,7 +26,7 @@ function unl_config($form, &$form_state) {
$form['root']['unl_tidy'] = array( $form['root']['unl_tidy'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => 'Clean up text area HTML', '#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'), '#default_value' => variable_get('unl_tidy'),
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment