Skip to content
Browse files

Fix URL-escaped characters appearing in snapshot name.

  • Loading branch information...
1 parent b07da97 commit daa95d8699251ca4f504eaaaa0f99d829142666c @lstein lstein committed
Showing with 4 additions and 2 deletions.
  1. +1 −0 Changes
  2. +3 −2 lib/Bio/Graphics/Browser2/Render/SnapshotManager.pm
View
1 Changes
@@ -2,6 +2,7 @@
* Restore h_feat & h_region functionality to gbrowse_img.
* Fix gbrowse_img documentation to point to correct example URLs on WormBase.
* Fix persistent grey screen when clicking on snapshot thumbnail.
+ * Fix URL-escaped characters appearing in snapshot name.
2.44
* Modest performance improvements when rendering multiple tracks.
View
5 lib/Bio/Graphics/Browser2/Render/SnapshotManager.pm
@@ -87,11 +87,12 @@ sub render_snapshots_listing {
my $innerHTML = '';
for my $snapshot_name (@sortedSnapshots) {
next unless $snapshot_name && $snapshot_name =~ /\S/;
-
+
$timeStamp = $snapshots->{$snapshot_name}{session_time};
$imageURL = $snapshots->{$snapshot_name}{data}{image_url};
($base,$s) = $render->globals->gbrowse_base;
($escapedKey = $snapshot_name) =~ s/(['"])/\\$1/g;
+ my $readable_name = CGI::unescape($snapshot_name); # ugly, but easier to fix here than where the real bug is
warn "time = $timeStamp" if DEBUG;
@@ -162,7 +163,7 @@ sub render_snapshots_listing {
-value => "Cancel",
-onclick => '$(\'' . "mail_snapshot_$escapedKey" . '\').hide(); this.style.zIndex = \'0\'',}),
));
- my $snapshot_image = span({-class=>'snapshot_image_frame'},span({-class => "snapshot_names"}, (substr $escapedKey, 5))).
+ my $snapshot_image = span({-class=>'snapshot_image_frame'},span({-class => "snapshot_names"}, (substr $readable_name, 5))).
span({-class => "timestamps"},$timeStamp,
img({-src => $imageURL, -width=>"50",-height=>"30",-class=>'snapshot_image',
-onclick => 'Controller.enlarge_image(' . "'${imageURL}'" . '); $(' . "'$escapedKey'" . ').style.zIndex = \'0\';',

0 comments on commit daa95d8

Please sign in to comment.
Something went wrong with that request. Please try again.