<commit_before># $Id$

package EnsEMBL::Web::Component::UserData::ShareURL;

use strict;

use EnsEMBL::Web::Tools::Encryption qw(checksum);

use base qw(EnsEMBL::Web::Component::UserData);

sub _init {
  my $self = shift;
  $self->cacheable(0);
  $self->ajaxable(0);
}

sub content {
  my $self      = shift;
  my $hub       = $self->hub;
  my @shares    = grep $_, $hub->param('share_id');
  my $share_ref = join ';', map { $_ =~ /^\d+$/ ? "share_ref=000000$_-" . checksum($_) : "share_ref=$_" } @shares;
  my $reload    = $hub->param('reload') ? '<div class="modal_reload"></div>' : '';
  my $url       = $hub->referer->{'absolute_url'};
     $url      .= $url =~ /\?/ ? ';' : '?' unless $url =~ /;$/;
     $url      .= $share_ref;
     
  return qq{
    <p class="space-below">To share this data, use the URL:</p>
    <p class="space-below"><a href="$url">$url</a></p>
    <p class="space-below">Please note that this link will expire after 72 hours.</p>
    $reload
  };
}
<commit_msg>Removed hyperlink from share URL, because we want people to use that as-is, not follow the link and copy from the browser address bar<commit_after># $Id$

package EnsEMBL::Web::Component::UserData::ShareURL;

use strict;

use EnsEMBL::Web::Tools::Encryption qw(checksum);

use base qw(EnsEMBL::Web::Component::UserData);

sub _init {
  my $self = shift;
  $self->cacheable(0);
  $self->ajaxable(0);
}

sub content {
  my $self      = shift;
  my $hub       = $self->hub;
  my @shares    = grep $_, $hub->param('share_id');
  my $share_ref = join ';', map { $_ =~ /^\d+$/ ? "share_ref=000000$_-" . checksum($_) : "share_ref=$_" } @shares;
  my $reload    = $hub->param('reload') ? '<div class="modal_reload"></div>' : '';
  my $url       = $hub->referer->{'absolute_url'};
     $url      .= $url =~ /\?/ ? ';' : '?' unless $url =~ /;$/;
     $url      .= $share_ref;
     
  return qq{
    <p class="space-below">To share this data, use the URL:</p>
    <p class="space-below">$url</p>
    <p class="space-below">Please note that this link will expire after 72 hours.</p>
    $reload
  };
}

{'fraction_non_alphanumeric': 0.2077922077922078, 'fraction_numerical': 0.00962000962000962, 'mean_word_length': 3.2362525458248474, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7385471', 'n_tokens_mistral': 811, 'n_tokens_neox': 770, 'n_words': 180}