[Bps-public-commit] r11963 - in HTML-RewriteAttributes: lib/HTML/RewriteAttributes

sartak at bestpractical.com sartak at bestpractical.com
Tue Apr 29 18:15:52 EDT 2008


Author: sartak
Date: Tue Apr 29 18:15:49 2008
New Revision: 11963

Modified:
   HTML-RewriteAttributes/   (props changed)
   HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm

Log:
 r54668 at onn:  sartak | 2008-04-29 18:15:38 -0400
 Working check for <style type="text/css">(the stuff in here)</style>


Modified: HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm
==============================================================================
--- HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm	(original)
+++ HTML-RewriteAttributes/lib/HTML/RewriteAttributes/Resources.pm	Tue Apr 29 18:15:49 2008
@@ -54,6 +54,9 @@
                 return;
             }
         }
+        if ($tag eq 'style' && $attr->{type} eq 'text/css') {
+            $self->{rewrite_look_for_style} = 1;
+        }
     }
 
     $self->SUPER::_start_tag(@_);
@@ -61,8 +64,7 @@
 
 sub _default {
     my ($self, $tag, $attrs, $text) = @_;
-
-    if ($tag && $tag eq 'script' && $attrs->{type} eq 'text/css') {
+    if (delete $self->{rewrite_look_for_style}) {
         $text = $self->_handle_imports($text);
     }
 



More information about the Bps-public-commit mailing list