aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlouise <louise>2009-11-09 16:16:18 +0000
committerlouise <louise>2009-11-09 16:16:18 +0000
commit5563601140230085dd581d3ef4f32a79e6d54db1 (patch)
treea47e3f9965e573b3cbf6cb104eef5399fc17c0ac
parent98049e41c1648a9ca8110798f50a79ef5cd99345 (diff)
Allowing cobrand to rewrite geocoding choice url
-rw-r--r--perllib/Page.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index be116ecbf..af6959a53 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.202 2009-11-05 14:40:55 matthew Exp $
+# $Id: Page.pm,v 1.203 2009-11-09 16:16:18 louise Exp $
#
package Page;
@@ -978,9 +978,9 @@ sub geocode_choice {
foreach my $choice (@$choices) {
$choice =~ s/, United Kingdom//;
$choice =~ s/, UK//;
- my $encoded_choice = $choice;
- $encoded_choice =~ s/ /+/g;
- $url = NewURL($q, -retain => 1, -url => $page, 'pc' => $encoded_choice);
+ my $cobrand = Page::get_cobrand($q);
+ $url = Cobrand::url($cobrand, NewURL($q, -retain => 1, -url => $page, 'pc' => $choice), $q);
+ $url =~ s/%20/+/g;
$out .= '<li><a href="' . $url . '">' . $choice . "</a></li>\n";
}
$out .= '</ul>';