Skip to content

Commit

Permalink
Fix image type regexp to work with query strings and properly escape '.'
Browse files Browse the repository at this point in the history
Authenticated S3 urls have a query string.
  • Loading branch information
Nathan Sutton authored and defunkt committed Feb 26, 2011
1 parent 9808a80 commit 6bff0b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/facebox.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
makeCompatible()

var imageTypes = $.facebox.settings.imageTypes.join('|')
$.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')$', 'i')
$.facebox.settings.imageTypesRegexp = new RegExp('\\.(' + imageTypes + ')(\\?.*)?$', 'i')

if (settings) $.extend($.facebox.settings, settings)
$('body').append($.facebox.settings.faceboxHtml)
Expand Down

0 comments on commit 6bff0b9

Please sign in to comment.