What steps will reproduce the problem?
1. View a gallery that contains a whitespace in its name
1a. this will most likely happen when get_the_title() is called in
get_thumbcode()
2. with thickbox enabled, try to view an image in the gallery
3. the "loading" animation is shown and never completes the image load
What is the expected output? What do you see instead?
I expect to see the image displayed in Thickbox, but that doesn't happen. Only
see the loading animation. Other galleries on the same page w/ a proper
$galleryID appear to load fine.
The core issue is that the rel='%GALLERY_NAME%' replacement happens and
substitutes a value with whitespace into the rel param.
What version of the product are you using? On what operating system?
NGG: 1.8.2
WP: 3.2.1
Please provide any additional information below.
This can be fixed by adding a very simple preg_replace at the very top of the
get_thumbcode function in lib/image.php to scrub whitespace:
=====
// Fix thickbox failure when $galleryname has a space in it
$galleryname = preg_replace( '/\s+/', '', $galleryname );
=====
It's possible that other non-letter characters could cause problems with
Thickbox if passed unchecked to the a tag.
Original issue reported on code.google.com by BMEM...@gmail.com on 27 Jul 2011 at 9:08
Original issue reported on code.google.com by
BMEM...@gmail.com
on 27 Jul 2011 at 9:08