aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm12
-rw-r--r--perllib/FixMyStreet/TestMech.pm4
-rw-r--r--perllib/Open311/Endpoint.pm2
3 files changed, 9 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 586d5e7ae..6047f063b 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -260,9 +260,9 @@ sub add_row : Private {
$row->{confirmed} =~ s/^(\d+)/ordinal($1)/e if $c->stash->{lang_code} eq 'en-gb';
}
- (my $title = _($alert_type->item_title)) =~ s/{{(.*?)}}/$row->{$1}/g;
- (my $link = $alert_type->item_link) =~ s/{{(.*?)}}/$row->{$1}/g;
- (my $desc = _($alert_type->item_description)) =~ s/{{(.*?)}}/$row->{$1}/g;
+ (my $title = _($alert_type->item_title)) =~ s/\{\{(.*?)}}/$row->{$1}/g;
+ (my $link = $alert_type->item_link) =~ s/\{\{(.*?)}}/$row->{$1}/g;
+ (my $desc = _($alert_type->item_description)) =~ s/\{\{(.*?)}}/$row->{$1}/g;
my $base_url = $c->cobrand->base_url_for_report($row);
my $url = $base_url . $link;
@@ -317,9 +317,9 @@ sub add_parameters : Private {
$row->{$_} = $c->stash->{title_params}->{$_};
}
- (my $title = _($alert_type->head_title)) =~ s/{{(.*?)}}/$row->{$1}/g;
- (my $link = $alert_type->head_link) =~ s/{{(.*?)}}/$row->{$1}/g;
- (my $desc = _($alert_type->head_description)) =~ s/{{(.*?)}}/$row->{$1}/g;
+ (my $title = _($alert_type->head_title)) =~ s/\{\{(.*?)}}/$row->{$1}/g;
+ (my $link = $alert_type->head_link) =~ s/\{\{(.*?)}}/$row->{$1}/g;
+ (my $desc = _($alert_type->head_description)) =~ s/\{\{(.*?)}}/$row->{$1}/g;
$c->stash->{rss}->channel(
title => ent($title),
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm
index 9d836ca4d..f3ee7787b 100644
--- a/perllib/FixMyStreet/TestMech.pm
+++ b/perllib/FixMyStreet/TestMech.pm
@@ -234,8 +234,8 @@ sub get_first_email {
my $mech = shift;
my $email = shift or do { fail 'No email retrieved'; return };
my $email_as_string = $email->as_string;
- ok $email_as_string =~ s{\s+Date:\s+\S.*?$}{}xmsg, "Found and stripped out date";
- ok $email_as_string =~ s{\s+Message-ID:\s+\S.*?$}{}xmsg, "Found and stripped out message ID (contains epoch)";
+ ok $email_as_string =~ s{^Date:\s+\S.*?\r?\n}{}xmsg, "Found and stripped out date";
+ ok $email_as_string =~ s{^Message-ID:\s+\S.*?\r?\n}{}xmsg, "Found and stripped out message ID (contains epoch)";
return $email_as_string;
}
diff --git a/perllib/Open311/Endpoint.pm b/perllib/Open311/Endpoint.pm
index 2a6ba742a..425a708ef 100644
--- a/perllib/Open311/Endpoint.pm
+++ b/perllib/Open311/Endpoint.pm
@@ -387,7 +387,7 @@ sub GET_Service_Definition {
key => $key,
name => $name,
}
- } $attribute->values_kv
+ } sort { $a->[0] cmp $b->[0] } $attribute->values_kv
]) : (),
map { $_ => $attribute->$_ }
qw/ code datatype datatype_description description /,