diff options
author | Martijn Cuppens <martijn.cuppens@gmail.com> | 2019-12-25 23:43:22 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-01-02 13:11:56 +0300 |
commit | 35d5cbf4fda4bfad4c244840824774bb94629212 (patch) | |
tree | 773e5114108ac0ab63ed5e8a10914195e5dd1f06 /scss | |
parent | 0d08c74d2fbb5e0a0b1991b5a51d7988f9e6952e (diff) |
Escape brackets (#29857)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Diffstat (limited to 'scss')
-rw-r--r-- | scss/_functions.scss | 7 | ||||
-rw-r--r-- | scss/_variables.scss | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss index 695e6cd2f8..ea02aa48ca 100644 --- a/scss/_functions.scss +++ b/scss/_functions.scss @@ -52,7 +52,12 @@ @function escape-svg($string) { @if str-index($string, "data:image/svg+xml") { @each $char, $encoded in $escaped-characters { - $string: str-replace($string, $char, $encoded); + // Do not escape the url brackets + @if str-index($string, "url(") == 1 { + $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}"); + } @else { + $string: str-replace($string, $char, $encoded); + } } } diff --git a/scss/_variables.scss b/scss/_variables.scss index 5d3135cd95..a85f43ceba 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -106,6 +106,8 @@ $escaped-characters: ( ("<","%3c"), (">","%3e"), ("#","%23"), + ("(","%28"), + (")","%29"), ) !default; |