233,234c233,240
<       $contentLength = drupal_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $tag[3]));
<       if ($contentLength + $totalLength > $length) {
---
>       $contentLength = drupal_strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|&#x[0-9a-f]{1,6};/i', ' ', $tag[3]));     
>       if ( $tag[2] ) {
>         $countingInvisible = preg_match('/style|script/', $tag[2]);
>       }
>       if (isset($countingInvisible) && $countingInvisible) {
>         $contentLength = 0;
>       }
>       if ($contentLength + $totalLength > $length && $tag[2]) {   
