--- lightbox2.insert.inc.orig 2011-01-17 21:36:52.000000000 +0100
+++ lightbox2.insert.inc 2011-01-17 21:39:35.000000000 +0100
@@ -57,10 +57,11 @@ function template_preprocess_lightbox2_i
}
$vars['linkurl'] = insert_create_url($linkpath);
+ $linkpath_original = $vars['item']['filepath'];
$vars['download_link'] = '';
$download_link_text = check_plain(variable_get('lightbox2_download_link_text', 'Download Original'));
if (!empty($download_link_text) && user_access('download original image')) {
- $vars['download_link'] = '
' . l($download_link_text, $vars['linkurl'], array('attributes' => array('target' => '_blank', 'id' => 'lightbox2-download-link-text')));
+ $vars['download_link'] = '
' . str_replace('"', '\'', l($download_link_text, $linkpath_original, array('attributes' => array('target' => '_blank', 'id' => 'lightbox2-download-link-text'))));
}
$vars['class'] = !empty($vars['widget']['insert_class']) ? $vars['widget']['insert_class'] : '';