aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2019-12-25 21:43:22 +0100
committerGitHub <[email protected]>2019-12-25 21:43:22 +0100
commit5c37724d4996c10eee931debfb60e57d99d7ab99 (patch)
treef358e93fbffdea64193d0a04dd0d8f5b00ce9e09
parent036a40c3dd6e7917429364bd352029045935bff1 (diff)
downloadbootstrap-5c37724d4996c10eee931debfb60e57d99d7ab99.tar.xz
bootstrap-5c37724d4996c10eee931debfb60e57d99d7ab99.zip
Escape brackets (#29857)
Co-authored-by: XhmikosR <[email protected]>
-rw-r--r--scss/_functions.scss7
-rw-r--r--scss/_variables.scss2
2 files changed, 8 insertions, 1 deletions
diff --git a/scss/_functions.scss b/scss/_functions.scss
index cc37c91f7..ad0e7a667 100644
--- a/scss/_functions.scss
+++ b/scss/_functions.scss
@@ -75,7 +75,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 c34e2d170..ef0f2125d 100644
--- a/scss/_variables.scss
+++ b/scss/_variables.scss
@@ -208,6 +208,8 @@ $escaped-characters: (
("<","%3c"),
(">","%3e"),
("#","%23"),
+ ("(","%28"),
+ (")","%29"),
) !default;
// Options