Author: allyb
Date: 2010-03-17 17:32:38 +0100 (Wed, 17 Mar 2010)
New Revision: 28580
Modified:
plugins/sfMinifyTSPlugin/trunk/lib/filter/sfMinifyTSFilter.class.php
Log:
Bug fix: Improved the regular expression that finds css/js tags
Modified: plugins/sfMinifyTSPlugin/trunk/lib/filter/sfMinifyTSFilter.class.php
===================================================================
--- plugins/sfMinifyTSPlugin/trunk/lib/filter/sfMinifyTSFilter.class.php
2010-03-17 16:29:17 UTC (rev 28579)
+++ plugins/sfMinifyTSPlugin/trunk/lib/filter/sfMinifyTSFilter.class.php
2010-03-17 16:32:38 UTC (rev 28580)
@@ -122,7 +122,7 @@
// replace the new names back into the response content
$response->setContent(str_replace($javascripts, $javascriptMD5,
$response->getContent()));
}
-
+
if ($css && $this->getParameter('stylesheets', true))
{
list($cssFullPaths, $cssMD5) = $this->parseFileList($css);
@@ -240,11 +240,14 @@
*/
private function getAttributesOfTag($content, $tagRegExp, $attrRegExp)
{
- if (preg_match($tagRegExp, $content, $matches))
+ if (preg_match_all($tagRegExp, $content, $matches))
{
- if (preg_match($attrRegExp, $matches[1], $attr))
+ foreach ($matches[1] as $attribute)
{
- return $attr[1];
+ if (preg_match($attrRegExp, $attribute, $attr))
+ {
+ return $attr[1];
+ }
}
}
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.