diff options
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 8 |
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; |