diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-07-02 11:20:06 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-07-02 11:20:06 +0100 |
commit | 669d0d195c57b1bcbe91e367c4b5ed4e7ba4084b (patch) | |
tree | c0b310da3fb04e5fe198167a0069481d991c9da1 | |
parent | 3dd035ddcba204029ddc6f5576ded03acbc29f01 (diff) |
Make sure ward names don't have / in them as otherwise it's not passed to Catalyst.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index aceca7f20..8cebc0e60 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -251,6 +251,7 @@ sub ward_check : Private { $ward =~ s/\+/ /g; $ward =~ s/\.html//; + $ward =~ s{_}{/}g; my $council = $c->stash->{council}; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 23a938440..82970ab69 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -669,6 +669,7 @@ sub short_name { $name =~ s/ (Borough|City|District|County) Council$//; $name =~ s/ Council$//; $name =~ s/ & / and /; + $name =~ s{/}{_}g; $name = URI::Escape::uri_escape_utf8($name); $name =~ s/%20/+/g; return $name; |