diff --git a/src/dzitilesource.js b/src/dzitilesource.js index 54b8cb68..443bfaca 100644 --- a/src/dzitilesource.js +++ b/src/dzitilesource.js @@ -140,7 +140,7 @@ $.extend( $.DziTileSource.prototype, $.TileSource.prototype, /** @lends OpenSead if (url && !options.tilesUrl) { options.tilesUrl = url.replace( - /([^\/]+?)(\.(dzi|xml|js))?(\?[^\/]*)?\/?$/, '$1_files/'); + /([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/, '$1_files/'); if (url.search(/\.(dzi|xml|js)\?/) != -1) { options.queryParams = url.match(/\?.*/); diff --git a/test/modules/dzitilesource.js b/test/modules/dzitilesource.js index e7eb2114..25b0c265 100644 --- a/test/modules/dzitilesource.js +++ b/test/modules/dzitilesource.js @@ -36,6 +36,9 @@ testImplicitTilesUrl( '/iiipsrv?DeepZoom=/path/my.dzi', '/iiipsrv?DeepZoom=/path/my_files/', 'querystring in dzi url should not be ignored before slashes'); + testImplicitTilesUrl( + '/fcg-bin/iipsrv.fcgi?Deepzoom=123test.tif.dzi', '/fcg-bin/iipsrv.fcgi?Deepzoom=123test.tif_files/', + 'filename in querystring does not have to contain slash'); }); }());