Skip to content

Commit

Permalink
Merge branch 'hotfix/fix-data-pattern' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Mathias committed Mar 5, 2013
2 parents e3ca6e5 + 764d1ef commit 4f022da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.txt
@@ -1,6 +1,9 @@
# CHANGE LOG

1.1.7
## 1.1.8
- Further updated to properly handle "data" values in quotes due to inconsistency in PHP regex versus standard.

## 1.1.7
- Further updated regex around "data:" values in url in CSS. Improved documentation of these regular expressions.

## 1.1.6
Expand Down
20 changes: 11 additions & 9 deletions cf-asset-optimizer.php
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://crowdfavorite.com
Description: Used to serve optimized and concatenated JS and CSS files enqueued on a page.
Author: Crowd Favorite
Version: 1.1.7
Version: 1.1.8
Author URI: http://crowdfavorite.com
*/

Expand Down Expand Up @@ -704,14 +704,16 @@ public static function buildConcatenatedStyleFile() {
) # end group 1
\s* # optional whitespace
(?! # negative lookahead assertion: skip if...
(?: # noncapturing group (not needed with lookaheads)
// # url starts with //
| # or
https?:// # url starts with http:// or https://
| # or
data: # url starts with data:
) # end noncapturing group
) # end negative lookahead
(?: # noncapturing group (not needed with lookaheads)
[\'"] # keep optional quote out of url match
| # or
// # url starts with //
| # or
https?:// # url starts with http:// or https://
| # or
data: # url starts with data:
) # end noncapturing group
) # end negative lookahead
( # begin group 2 (relative URL)
/? # optional root /
[^[:space:]] # one single nonspace character
Expand Down

0 comments on commit 4f022da

Please sign in to comment.