Changeset 25800 for trunk/include/template.class.php
- Timestamp:
- Dec 6, 2013, 6:18:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.class.php
r25568 r25800 1538 1538 private static function process_css_rec($css, $dir) 1539 1539 { 1540 static $PATTERN = "#url\(\s*['|\"]{0,1}(.*?)['|\"]{0,1}\s*\)#"; 1541 1542 if (preg_match_all($PATTERN, $css, $matches, PREG_SET_ORDER)) 1540 static $PATTERN_URL = "#url\(\s*['|\"]{0,1}(.*?)['|\"]{0,1}\s*\)#"; 1541 static $PATTERN_IMPORT = "#@import\s*['|\"]{0,1}(.*?)['|\"]{0,1};#"; 1542 1543 if (preg_match_all($PATTERN_URL, $css, $matches, PREG_SET_ORDER)) 1543 1544 { 1544 1545 $search = $replace = array(); 1545 1546 foreach ($matches as $match) 1546 1547 { 1547 if ( !url_is_remote($match[1]) && $match[1][0] != '/' )1548 if ( !url_is_remote($match[1]) && $match[1][0] != '/' && strpos($match[1], 'data:image/')===false) 1548 1549 { 1549 1550 $relative = $dir . "/$match[1]"; … … 1555 1556 } 1556 1557 1557 $imports = preg_match_all("#@import\s*['|\"]{0,1}(.*?)['|\"]{0,1};#", $css, $matches, PREG_SET_ORDER); 1558 if ($imports) 1558 if (preg_match_all($PATTERN_IMPORT, $css, $matches, PREG_SET_ORDER)) 1559 1559 { 1560 1560 $search = $replace = array();
Note: See TracChangeset
for help on using the changeset viewer.