You are here

function html5_tools_clean in HTML5 Tools 6

Clean markup by removing obsolete attributes.

Parameters

$data: The markup that needs to be scrubbed.

$remove: (Optional) Array of strings to be cleaned from the markup in data in addition to the defaults defined within the function.

1 call to html5_tools_clean()
html5_tools_preprocess_page in ./html5_tools.module
Preprocess function to clean up drupal's default variables

File

./html5_tools.module, line 115

Code

function html5_tools_clean($data, $remove = array()) {
  $obsolete = array_merge(array(
    '/ type="text\\/css"/',
    '/ type="text\\/javascript"/',
    '/<meta http-equiv=\\"Content-Type\\"[^>]*>/',
  ), $remove);
  return preg_replace($obsolete, '', $data);
}