diff options
author | Haijian Wang <haijian@vaadin.com> | 2013-01-02 16:54:11 +0200 |
---|---|---|
committer | Haijian Wang <haijian@vaadin.com> | 2013-01-02 16:54:11 +0200 |
commit | 9df030ba55101db4a3a35c301769655d6fa7aa08 (patch) | |
tree | 5f2ba1c2d0da7c0807fca21856615ebd16eca9cb /theme-compiler | |
parent | 7ed4e5e6ff8ca08ab50225ac5c33bed59a226217 (diff) | |
download | vaadin-framework-9df030ba55101db4a3a35c301769655d6fa7aa08.tar.gz vaadin-framework-9df030ba55101db4a3a35c301769655d6fa7aa08.zip |
fix Ticket #10506, remove quotes in url path
taking single quote into consideration
Change-Id: I966ffeba8a60c7c16980cca3dfa69935e0aca67b
Diffstat (limited to 'theme-compiler')
4 files changed, 14 insertions, 1 deletions
diff --git a/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java b/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java index 1ba1072767..67e6df6383 100644 --- a/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java +++ b/theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java @@ -100,7 +100,9 @@ public class ImportNodeHandler { LexicalUnit value = ((RuleNode) child).getValue(); while (value != null) { if (value.getLexicalUnitType() == LexicalUnit.SAC_URI) { - String path = value.getStringValue(); + String path = value.getStringValue() + .replaceAll("^\"|\"$", "") + .replaceAll("^'|'$", ""); if (!path.startsWith("/") && !path.contains(":")) { path = prefix + path; path = StringUtil.cleanPath(path); diff --git a/theme-compiler/tests/resources/automatic/css/url-path.css b/theme-compiler/tests/resources/automatic/css/url-path.css new file mode 100644 index 0000000000..1045948ac8 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/css/url-path.css @@ -0,0 +1,5 @@ +.bar { + background: url(foo/lorem.png); + background: url(foo/lorem.png); + background: url(foo/lorem.png); +}
\ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/foo/bar.scss b/theme-compiler/tests/resources/automatic/scss/foo/bar.scss new file mode 100644 index 0000000000..326d34232d --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/foo/bar.scss @@ -0,0 +1,5 @@ +.bar { + background: url("lorem.png"); + background: url('lorem.png'); + background: url(lorem.png); +}
\ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/url-path.scss b/theme-compiler/tests/resources/automatic/scss/url-path.scss new file mode 100644 index 0000000000..0cc954bfb4 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/url-path.scss @@ -0,0 +1 @@ +@import "foo/bar.scss";
\ No newline at end of file |