Commit 3638cff3 authored by Guy Tepper's avatar Guy Tepper

[BUGFIX] duplicated data URI encoding method

parent 98461e8c
......@@ -73,7 +73,7 @@ module.exports = function (_options) {
// store this svg data
svgs.push({
name: path.basename(file.path, '.svg'),
inline: 'data:image/svg+xml,' + urlEncode(file.contents),
inline: urlEncode(file.contents),
width: parseInt(width) + 'px',
height: parseInt(height) + 'px'
});
......
$test: "data:image/svg+xml,data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='350.471' height='350.471'%3E%3Cg stroke='%230091d4' stroke-width='1.9'%3E%3Cpath d='M.95.95h234.286v225.714H.95z'/%3E%3Cpath d='M349.52 236.664c0 62.33-50.526 112.857-112.856 112.857-62.33 0-112.857-50.526-112.857-112.856 0-62.33 50.528-112.857 112.857-112.857 62.33 0 112.857 50.528 112.857 112.857z'/%3E%3C/g%3E%3C/svg%3E" 350px 350px;
$test: "data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='350.471' height='350.471'%3E%3Cg stroke='%230091d4' stroke-width='1.9'%3E%3Cpath d='M.95.95h234.286v225.714H.95z'/%3E%3Cpath d='M349.52 236.664c0 62.33-50.526 112.857-112.856 112.857-62.33 0-112.857-50.526-112.857-112.856 0-62.33 50.528-112.857 112.857-112.857 62.33 0 112.857 50.528 112.857 112.857z'/%3E%3C/g%3E%3C/svg%3E" 350px 350px;
@mixin inline-svg($name) {
background: transparent url(nth($name, 1)) no-repeat 50% 50%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment