Skip to content

Commit

Permalink
- Encode URI on image src
Browse files Browse the repository at this point in the history
- Version up
  • Loading branch information
matthisk committed Jan 24, 2014
1 parent 76eac31 commit c51b9fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion respify.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"jquery",
"picture"
],
"version" : "0.3.1",
"version" : "0.3.2",
"author" : {
"name" : "Matthisk Heimensen",
"url" : "http://twitter.com/tthisk"
Expand Down
6 changes: 3 additions & 3 deletions respify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
(function( w, factory ) {
Expand Down Expand Up @@ -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 ) + ')' );
}
};

Expand Down

0 comments on commit c51b9fb

Please sign in to comment.