diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f64e32ef..e92e142ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # v1.7.0-rc.16 -## mm/dd/2020 +## 09/01/2020 1. [](#new) * Added a new `svg_image()` twig function to make it easier to 'include' SVG source in Twig @@ -444,6 +444,15 @@ * Optimization: Initialize debugbar only after the configuration has been loaded * Optimization: Combine some early Grav processors into a single one + +# v1.6.27 +## 09/01/2020 + +1. [](#improved) + * Right trim route for safety + * Use the proper ellipsis for summary [#2939](https://github.com/getgrav/grav/pull/2939) + * Left pad schedule times with zeros [#2921](https://github.com/getgrav/grav/pull/2921) + # v1.6.26 ## 06/08/2020 diff --git a/system/defines.php b/system/defines.php index e6f85b34d..654a8cee1 100644 --- a/system/defines.php +++ b/system/defines.php @@ -8,7 +8,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.7.0-rc.15'); +define('GRAV_VERSION', '1.7.0-rc.16'); define('GRAV_TESTING', true); define('DS', '/'); diff --git a/system/src/Grav/Common/Twig/TwigExtension.php b/system/src/Grav/Common/Twig/TwigExtension.php index 9df51e8d0..48bd64556 100644 --- a/system/src/Grav/Common/Twig/TwigExtension.php +++ b/system/src/Grav/Common/Twig/TwigExtension.php @@ -1420,7 +1420,7 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface * @param $classes * @return string|string[]|null */ - public static function svgImageFunction($path, $classes = null) + public static function svgImageFunction($path, $classes = null, $strip_style = false) { $path = Utils::fullPath($path); @@ -1431,6 +1431,14 @@ class TwigExtension extends AbstractExtension implements GlobalsInterface $classes = " inline-block $classes"; $matched = false; + //Remove xml tag if it exists + $svg = preg_replace('/^<\?xml.*\?>/','', $svg); + + //Strip style if needed + if ($strip_style) { + $svg = preg_replace('//s', '', $svg); + } + //Look for existing class $svg = preg_replace_callback('/^/', function($matches) use ($classes, &$matched) { if (isset($matches[2])) {