davidtran / gulp-inline-svg

Embed inline svg to your website
1 stars 0 forks source link

Bug on 1.1.0 change #1

Open LukaszPrzybysz opened 7 years ago

LukaszPrzybysz commented 7 years ago

Hi, Your urlEncode function added in 1.1.0 version breaks our code with following error when trying to process output file with gulp-sass plugin:

Error in plugin 'sass'
Message:
    Content\scss\common\_svg.scss
Error: Invalid CSS after "...10' xmlns='http": expected 1 selector or at-rule, was "://www.w3.org/2000/"
        on line 1 of Content/scss/common/_svg.scss
>> 5' height='10' viewBox='0 0 15 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpat
   ------------------------------------------^
davidtran commented 7 years ago

Can you send me content of your sass file ?

wallyzielinski commented 6 years ago

+1 I've been dealing with this as well. Need to point to v 1.0.x in my package.json to resolve.

If it helps: here's a diff of 1.1.1 output vs 1.0.4 output: http://prntscr.com/j7ggh4

1.1.1: $angle-down: "data:image/svg+xml;charset=utf8,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480.1 268.6'%3E %3Cpath d='M0,29.8C0,13.2,13.2,0,29.8,0c6.6,0,16.5,3.3,19.8,9.9l191.7,188.4L429.7,9.9c9.9-9.9,29.8-9.9,43,0 c9.9,9.9,9.9,29.8,0,39.7L261.1,261.1c-9.9,9.9-29.8,9.9-43,0l0,0L6.6,49.6C3.3,43,0,36.4,0,29.8z'/%3E %3C/svg%3E" 480px 268px;

1.0.4: $angle-down: "data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20480.1%20268.6%22%3E%0D%0A%3Cpath%20d%3D%22M0%2C29.8C0%2C13.2%2C13.2%2C0%2C29.8%2C0c6.6%2C0%2C16.5%2C3.3%2C19.8%2C9.9l191.7%2C188.4L429.7%2C9.9c9.9-9.9%2C29.8-9.9%2C43%2C0%0D%0A%09c9.9%2C9.9%2C9.9%2C29.8%2C0%2C39.7L261.1%2C261.1c-9.9%2C9.9-29.8%2C9.9-43%2C0l0%2C0L6.6%2C49.6C3.3%2C43%2C0%2C36.4%2C0%2C29.8z%22%2F%3E%0D%0A%3C%2Fsvg%3E%0D%0A" 480px 268px;