Merge remote-tracking branch 'origin/1.7' into 1.7

This commit is contained in:
Matias Griese
2020-12-10 21:47:06 +02:00
4 changed files with 10 additions and 1 deletions

View File

@@ -27,6 +27,9 @@ jobs:
extensions: opcache, gd
coverage: none
- name: Update composer
run: composer update
- name: Validate composer.json and composer.lock
run: composer validate

View File

@@ -544,8 +544,11 @@
# v1.6.31
## mm/dd/2020
1. [](#improved)
* Allow all CSS and JS via `robots.txt` [#2006](https://github.com/getgrav/grav/issues/2006) [#3067](https://github.com/getgrav/grav/issues/3067)
1. [](#bugfix)
* Fixed `pages` field escaping issues, needs admin update, too [admin#1990](https://github.com/getgrav/grav-plugin-admin/issues/1990)
* Fix `svg-image` issue with classes applied to all elements [#3068](https://github.com/getgrav/grav/issues/3068)
# v1.6.30
## 12/03/2020

View File

@@ -11,3 +11,5 @@ Allow: /user/pages/
Allow: /user/themes/
Allow: /user/images/
Allow: /
Allow: *.css$
Allow: *.js$

View File

@@ -1452,12 +1452,13 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface
}
//Look for existing class
$svg = preg_replace_callback('/^<svg.*?(class=\"(.*?)").*>/', function($matches) use ($classes, &$matched) {
$svg = preg_replace_callback('/^<svg[^>]*(class=\")([^"]*)(\")[^>]*>/', function($matches) use ($classes, &$matched) {
if (isset($matches[2])) {
$new_classes = $matches[2] . $classes;
$matched = true;
return str_replace($matches[1], "class=\"$new_classes\"", $matches[0]);
}
return $matches[0];
}, $svg
);