From db40540248bb36703eb62c9b6102e99e8ae4f566 Mon Sep 17 00:00:00 2001 From: Mark George Date: Mon, 6 Feb 2017 04:12:16 +0000 Subject: [PATCH] Ignore GET parameters when checking an image's original file url matches container href --- modules/carousel/jetpack-carousel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/carousel/jetpack-carousel.js b/modules/carousel/jetpack-carousel.js index 9ed78b7683143..b17e08f19d92e 100644 --- a/modules/carousel/jetpack-carousel.js +++ b/modules/carousel/jetpack-carousel.js @@ -1429,8 +1429,8 @@ jQuery(document).ready(function($) { var valid = false; - // if link points to 'Media File' and flag is set allow it - if ( $( container ).attr( 'href' ) === $( this ).attr( 'data-orig-file' ) && + // if link points to 'Media File' (ignoring GET parameters) and flag is set allow it + if ( $( container ).attr( 'href' ).split( '?' )[0] === $( this ).attr( 'data-orig-file' ).split( '?' )[0] && 1 === Number( jetpackCarouselStrings.single_image_gallery_media_file ) ) { valid = true;