<commit_before>package EnsEMBL::Web::Document::HTML::Copyright;

### Replacement copyright notice for www.ensembl.org

use strict;
use URI::Escape qw(uri_escape);
use EnsEMBL::Web::RegObj;

use base qw(EnsEMBL::Web::Document::HTML);

sub new { return shift->SUPER::new('sitename' => '?'); }

sub sitename    :lvalue { $_[0]{'sitename'};   }

sub render {
  my $self = shift;
  my @time = localtime();
  my $year = @time[5] + 1900;

  my $sd = $ENSEMBL_WEB_REGISTRY->species_defs;

  my $you_are_here = $ENV{'REQUEST_URI'};
  my $referer      = uri_escape($you_are_here);
  my $stable_URL   = uri_escape('http://'. $sd->ARCHIVE_VERSION .'.archive.ensembl.org'. $you_are_here);

  $self->printf(
    q(
    <div class="twocol-left left unpadded">
        %s release %d - %s
      &copy; <span class="print_hide"><a href="http://www.sanger.ac.uk/" class="nowrap">WTSI</a> /
      <a href="http://www.ebi.ac.uk/" style="white-space:nowrap">EBI</a></span>
      <span class="screen_hide_inline">WTSI / EBI<br />http://%s</span>
    ),
    $sd->ENSEMBL_SITETYPE, $sd->ENSEMBL_VERSION,
    $sd->ENSEMBL_RELEASE_DATE, $sd->ENSEMBL_SERVERNAME,
    );
  
  $self->printf('<div class="print_hide">'); 
  unless ($ENV{'ENSEMBL_TYPE'} =~ /Help|Account|UserData/) {
    $self->printf(
      q(
      <br />
        <a class="modal_link" id="p_link" href="%s">Permanent link</a>
      ),
    '/Help/Permalink?url='.$stable_URL,
    );
    unless ($you_are_here =~ /html$/ && $you_are_here ne '/index.html') {
      ## Omit archive links from static content, which tends to change a lot
      $self->printf(
        q(
         - <a class="modal_link" id="a_link" href="%s">View in archive site</a>
        ),
      '/Help/ArchiveList?url='.$referer,
      );
    }
  }
  $self->print('</div></div>');<commit_msg>for some reason, the url param is now being unescaped earlier, and causing links to break. abandon it in favour of using the referer<commit_after>package EnsEMBL::Web::Document::HTML::Copyright;

### Replacement copyright notice for www.ensembl.org

use strict;
use URI::Escape qw(uri_escape);
use EnsEMBL::Web::RegObj;

use base qw(EnsEMBL::Web::Document::HTML);

sub new { return shift->SUPER::new('sitename' => '?'); }

sub sitename    :lvalue { $_[0]{'sitename'};   }

sub render {
  my $self = shift;
  my @time = localtime();
  my $year = @time[5] + 1900;

  my $sd = $ENSEMBL_WEB_REGISTRY->species_defs;

  my $you_are_here = $ENV{'REQUEST_URI'};
  my $stable_URL   = uri_escape('http://' . $sd->ARCHIVE_VERSION . '.archive.ensembl.org');

  $self->printf(
    q(
    <div class="twocol-left left unpadded">
        %s release %d - %s
      &copy; <span class="print_hide"><a href="http://www.sanger.ac.uk/" class="nowrap">WTSI</a> /
      <a href="http://www.ebi.ac.uk/" style="white-space:nowrap">EBI</a></span>
      <span class="screen_hide_inline">WTSI / EBI<br />http://%s</span>
    ),
    $sd->ENSEMBL_SITETYPE, $sd->ENSEMBL_VERSION,
    $sd->ENSEMBL_RELEASE_DATE, $sd->ENSEMBL_SERVERNAME,
    );
  
  $self->printf('<div class="print_hide">'); 
  unless ($ENV{'ENSEMBL_TYPE'} =~ /Help|Account|UserData/) {
    $self->print(
      qq{
      <br />
        <a class="modal_link" id="p_link" href="/Help/Permalink?url=$stable_URL">Permanent link</a>
      }
    );
    unless ($you_are_here =~ /html$/ && $you_are_here ne '/index.html') {
      ## Omit archive links from static content, which tends to change a lot
      $self->print(
        '
         - <a class="modal_link" id="a_link" href="/Help/ArchiveList">View in archive site</a>
        '
      );
    }
  }
  $self->print('</div></div>');
{'fraction_non_alphanumeric': 0.19052893935198006, 'fraction_numerical': 0.003323179174743838, 'mean_word_length': 3.3728813559322033, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 65, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '3628196', 'n_tokens_mistral': 1380, 'n_tokens_neox': 1337, 'n_words': 257}