diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index 42cd94f02..ae18a4283 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -16,6 +16,7 @@
- reverted #9386: Gallery: "Image resolutions" issue. This is a feature of the Galley.
- fixed: HTTP Proxy doesn't serve new content to visitors
- fixed: Exporting to static files can leak large amounts of memory
+ - fixed: Paginator generates bad markup for next page links
7.6.8
- added #!/usr/bin/env perl to all utility scripts
diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm
index a10235746..dc58a2904 100644
--- a/lib/WebGUI/Paginator.pm
+++ b/lib/WebGUI/Paginator.pm
@@ -350,18 +350,18 @@ Returns a link to the next page's data.
=cut
sub getNextPageLink {
- my ($self) = @_;
- my ($text, $pn, $ctext);
- $pn = $self->getPageNumber;
- my $i18n = WebGUI::International->new($self->session);
- $ctext = $i18n->get(92);
- $text = $ctext.'»';
- if ($pn < $self->getNumberOfPages) {
- my $url = $self->session->url->append($self->{_url},($self->{_formVar}.'='.($pn+1)));
- return wantarray ? ($url,$ctext,''.$text.'') : ''.$text.'';
- } else {
- return wantarray ? (undef,$ctext,$text) : $text;
- }
+ my ($self) = @_;
+ my ($text, $pn, $ctext);
+ $pn = $self->getPageNumber;
+ my $i18n = WebGUI::International->new($self->session);
+ $ctext = $i18n->get(92);
+ $text = $ctext.'»';
+ my $url = undef;
+ if ($pn < $self->getNumberOfPages) {
+ $url = $self->session->url->append($self->{_url},($self->{_formVar}.'='.($pn+1)));
+ $text = '' . $text . '';
+ }
+ return wantarray ? ($url, $ctext, $text) : $text;
}
@@ -528,18 +528,18 @@ Returns a link to the previous page's data.
=cut
sub getPreviousPageLink {
- my ($self) = @_;
- my ($text, $pn, $ctext);
- $pn = $self->getPageNumber;
- my $i18n = WebGUI::International->new($self->session);
- $ctext = $i18n->get(91);
- $text = '«'.$ctext;
- if ($pn > 1) {
- my $url = $self->session->url->append($self->{_url},($self->{_formVar}.'='.($pn-1)));
- return wantarray ? ($url,$ctext,''.$text.'') : ''.$text.'';
- } else {
- return wantarray ? (undef,$ctext,$text) : $text;
- }
+ my ($self) = @_;
+ my ($text, $pn, $ctext);
+ $pn = $self->getPageNumber;
+ my $i18n = WebGUI::International->new($self->session);
+ $ctext = $i18n->get(91);
+ $text = '«'.$ctext;
+ my $url = undef;
+ if ($pn > 1) {
+ $url = $self->session->url->append($self->{_url},($self->{_formVar}.'='.($pn-1)));
+ $text = ''.$text.'';
+ }
+ return wantarray ? ($url, $ctext, $text) : $text;
}