aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Rss.pm6
-rw-r--r--perllib/FixMyStreet/SendReport/EastHants.pm6
2 files changed, 10 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm
index 3497ad0e1..7cf4783c0 100755
--- a/perllib/FixMyStreet/App/Controller/Rss.pm
+++ b/perllib/FixMyStreet/App/Controller/Rss.pm
@@ -3,7 +3,7 @@ package FixMyStreet::App::Controller::Rss;
use Moose;
use namespace::autoclean;
use POSIX qw(strftime);
-use HTML::Entities;
+use HTML::Entities qw();
use URI::Escape;
use XML::RSS;
@@ -28,6 +28,10 @@ Catalyst Controller.
=cut
+sub encode_entities {
+ HTML::Entities::encode_entities($_[0], '\x00-\x1f\x7f<>&"\'');
+}
+
sub updates : LocalRegex('^(\d+)$') {
my ( $self, $c ) = @_;
diff --git a/perllib/FixMyStreet/SendReport/EastHants.pm b/perllib/FixMyStreet/SendReport/EastHants.pm
index b24123f94..6baa8a306 100644
--- a/perllib/FixMyStreet/SendReport/EastHants.pm
+++ b/perllib/FixMyStreet/SendReport/EastHants.pm
@@ -6,7 +6,11 @@ BEGIN { extends 'FixMyStreet::SendReport'; }
use Try::Tiny;
use Encode;
-use HTML::Entities;
+use HTML::Entities qw();
+
+sub encode_entities {
+ HTML::Entities::encode_entities($_[0], '\x00-\x1f\x7f<>&"\'');
+}
sub construct_message {
my %h = @_;