diff --git a/README.md b/README.md index 68981461..f71a4470 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ h5ai is provided under the terms of the [MIT License](http://github.com/lrsjng/h * fixes include problems in PHP version * fixes path problems on servers running on Windows in PHP version * fixes broken links in custom headers/footers while zipped download enabled - +* fixes problems with thumbnails for files with single or double quotes in filename ### v0.17 - *2011-11-28* diff --git a/src/_h5ai/js/inc/Html.js b/src/_h5ai/js/inc/Html.js index d95a07e8..6b092e47 100644 --- a/src/_h5ai/js/inc/Html.js +++ b/src/_h5ai/js/inc/Html.js @@ -74,8 +74,9 @@ if (H5AI.core.settings.showThumbs === true && $.inArray(path.type, thumbTypes) >= 0) { imgClass = "class='thumb'"; - icon16 = H5AI.core.api() + "?action=thumb&href=" + path.absHref + "&width=16&height=16&mode=square"; - icon48 = H5AI.core.api() + "?action=thumb&href=" + path.absHref + "&width=96&height=46&mode=rational"; + var escapedHref = path.absHref.replace(/'/g, "%27").replace(/"/g, "%22"); + icon16 = H5AI.core.api() + "?action=thumb&href=" + escapedHref + "&width=16&height=16&mode=square"; + icon48 = H5AI.core.api() + "?action=thumb&href=" + escapedHref + "&width=96&height=46&mode=rational"; } $label = $("" + path.label + "");