aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-09-19 10:17:53 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-09-19 10:17:53 +0100
commit9b7ebf0eebd8dfe0227b55aec3435bacd243f7be (patch)
tree03ad9a5b22b0b73e375bb37eb74ed2a97aff1a1a /perllib/FixMyStreet/App/View/Web.pm
parent501efd9bea3c3aee1e9d0dcc708fe6d859cba33f (diff)
Add a view-configuration admin page.
Fixes #561.
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;