}
// Replacing background images
else if (path.match(/\.(gif|jpg|jpeg|png|svg|tiff)([?#].*)?/i)) {
+ path = path.replace(/\(/g, '%28').replace(/\)/g, '%29');
this.$element.css({ 'background-image': 'url('+path+')' })
.trigger(trigger);
}
switch (type) {
case 'image':
case 'background':
- return `_build/assets/img/interchange/${size}.jpg`;
+ return `_build/assets/img/interchange/strip_icc()/${size}.jpg`;
default:
return `_build/assets/partials/interchange-${size}.html`;
}
plugin.replace(getPath('background', 'large'));
- $html[0].style.backgroundImage.should.contain(getPath('background', 'large'));
+ $html[0].style.backgroundImage.should.contain(getPath('background', 'large').replace(/\(/g, '%28').replace(/\)/g, '%29'));
});
it('replaces contents of div with templates', function() {
plugin.rules.length.should.be.equal(3);
});
- it('extracts special queries from the plugin element', function() {
+ it('extracts special queries from the plugin element', function() {
$html = $(generateTemplate('image')).attr('data-interchange', '[image.png, retina]').appendTo('body');
plugin = new Foundation.Interchange($html, {});