kthornbloom / Smoothproducts

A simple, lightweight and responsive product image viewer using jQuery
kthornbloom.com/smoothproducts
185 stars 89 forks source link

Problem with a filename or path that contains ")" char #33

Open RickenB opened 7 years ago

RickenB commented 7 years ago

If the filename or the path contains the ")" character, the image doesn't show because the thumb element have the style attribute as this: <a href="... " style="background-image: url(http://mydomain.com/path/filenamewith).jpg)" ...

This could be resolved adding the ' delimiter before and after the image path: <a href="... " style="background-image: url('http://mydomain.com/path/filenamewith).jpg')" ...

So you can modify the row 36 with this: $(this).parents('.sp-wrap').find('.sp-thumbs').append('<a href="' + large + '" style="background-image:url(\'' + thumb + '\')"'+classes+'>');

Hope it helps.