Development

Changeset 28580

You must first sign up to be able to contribute.

Changeset 28580

Show
Ignore:
Timestamp:
03/17/10 17:32:38 (3 years ago)
Author:
allyb
Message:

Bug fix: Improved the regular expression that finds css/js tags

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfMinifyTSPlugin/trunk/lib/filter/sfMinifyTSFilter.class.php

    r27486 r28580  
    123123      $response->setContent(str_replace($javascripts, $javascriptMD5, $response->getContent())); 
    124124    } 
    125      
     125 
    126126    if ($css && $this->getParameter('stylesheets', true)) 
    127127    { 
     
    241241  private function getAttributesOfTag($content, $tagRegExp, $attrRegExp) 
    242242  { 
    243     if (preg_match($tagRegExp, $content, $matches)) 
    244     { 
    245       if (preg_match($attrRegExp, $matches[1], $attr)) 
    246       { 
    247         return $attr[1]; 
     243    if (preg_match_all($tagRegExp, $content, $matches)) 
     244    { 
     245      foreach ($matches[1] as $attribute) 
     246      { 
     247        if (preg_match($attrRegExp, $attribute, $attr)) 
     248        { 
     249          return $attr[1]; 
     250        } 
    248251      } 
    249252    }