From c51b9fbd5b443eac06b3679318a295d01aa82e56 Mon Sep 17 00:00:00 2001 From: Matthisk Heimensen Date: Fri, 24 Jan 2014 10:25:50 +0100 Subject: [PATCH] - Encode URI on image src - Version up --- bower.json | 2 +- respify.jquery.json | 2 +- respify.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index cf5cc74..ee081f0 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "Respify", "main": "Respify.js", - "version": "0.3.1", + "version": "0.3.2", "homepage": "https://github.com/matthisk/Respify", "authors": [ "Matthisk Heimensen " diff --git a/respify.jquery.json b/respify.jquery.json index 0563370..a7a45ad 100644 --- a/respify.jquery.json +++ b/respify.jquery.json @@ -9,7 +9,7 @@ "jquery", "picture" ], - "version" : "0.3.1", + "version" : "0.3.2", "author" : { "name" : "Matthisk Heimensen", "url" : "http://twitter.com/tthisk" diff --git a/respify.js b/respify.js index e856c1b..f756722 100644 --- a/respify.js +++ b/respify.js @@ -2,7 +2,7 @@ * Respify responsive image library * * Parse a responsive image from a set of data attributes trough media queries, depends upon the matchMedia polyfill for older browsers - * @version 0.3.1 + * @version 0.3.2 * @author Matthisk Heimensen */ (function( w, factory ) { @@ -100,9 +100,9 @@ Picture.prototype.setMatch = function() { if( ! this.settings.background ) { - this.setImage( this.currentMatch.src, this.$el.data( 'alt' ) ); + this.setImage( encodeURI( this.currentMatch.src ), this.$el.data( 'alt' ) ); } else { - this.$el.css( 'background-image', 'url(' + encodeURI(this.currentMatch.src) + ')' ); + this.$el.css( 'background-image', 'url(' + encodeURI( this.currentMatch.src ) + ')' ); } };