aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.pm
diff options
context:
space:
mode:
authorChris Mytton <self@hecticjeff.net>2013-09-25 11:50:26 +0100
committerChris Mytton <self@hecticjeff.net>2013-09-25 11:50:26 +0100
commit0efb806e7dbfc6681230041751ed49552ec3ba5b (patch)
tree9bf58000568f1376b309e9aade9c0fc601637750 /perllib/FixMyStreet/App/View/Web.pm
parent8e5005fd26b4396443f0aac1d7bb8f05f8357bd6 (diff)
parentf26fe9ff49a22eb532d4dea94158952d0bc01022 (diff)
Merge branch 'master' into oxfordshire-usability-recommendations
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 8d3775ddc..e4aafe951 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -19,7 +19,7 @@ __PACKAGE__->config(
render_die => 1,
expose_methods => [
'loc', 'nget', 'tprintf', 'display_crosssell_advert', 'prettify_dt',
- 'add_links', 'version',
+ 'add_links', 'version', 'decode',
],
FILTERS => {
escape_js => \&escape_js,
@@ -181,5 +181,11 @@ sub version {
return "$file?$version_hash{$file}";
}
+sub decode {
+ my ( $self, $c, $text ) = @_;
+ utf8::decode($text) unless utf8::is_utf8($text);
+ return $text;
+}
+
1;