diff --git a/unc_display.inc.php b/unc_display.inc.php index 1924924..bab8698 100644 --- a/unc_display.inc.php +++ b/unc_display.inc.php @@ -329,7 +329,7 @@ function unc_display_image_html($file_path, $show_thumb, $file_data = false) { $gal_text = ''; if ($UNC_GALLERY['image_view_method'] == 'photoswipe') { global $post; - $slug = $post->post_name; + $slug = str_replace("-", "_", $post->post_name); $gal_text = "onClick=\"unc_g_photoswipe_$slug({$F['index']}); return false;\""; } else if ($UNC_GALLERY['image_view_method'] == 'lightbox') { $gal_text = "data-lightbox=\"gallery_{$F['file_name']}\""; @@ -347,7 +347,7 @@ function unc_display_image_html($file_path, $show_thumb, $file_data = false) { function unc_display_photoswipe_js($files) { global $post; - $slug = $post->post_name; + $slug = str_replace("-", "_", $post->post_name); $out = '