diff --git a/template.php b/template.php index 763a24af51a1a1c4f51b3c964ccc4100da8afb6a..e425b9b8e5d0361565b99ad8394ca4b38f759e52 100644 --- a/template.php +++ b/template.php @@ -221,8 +221,13 @@ function zen_process_html_tag(&$variables) { $tag = &$variables['element']; if ($tag['#tag'] == 'style' || $tag['#tag'] == 'script') { - // Remove redundant type attribute and CDATA comments. - unset($tag['#attributes']['type'], $tag['#value_prefix'], $tag['#value_suffix']); + // Remove redundant CDATA comments. + unset($tag['#value_prefix'], $tag['#value_suffix']); + + // Remove redundant type attribute. + if (isset($tag['#attributes']['type']) && $tag['#attributes']['type'] !== 'text/ng-template') { + unset($tag['#attributes']['type']); + } // Remove media="all" but leave others unaffected. if (isset($tag['#attributes']['media']) && $tag['#attributes']['media'] === 'all') {