diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-02 15:49:49 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-10-02 17:32:19 +0100 |
commit | 6f43693cfc58d5356fafd231f2a232eb2fd99ae5 (patch) | |
tree | 95a53be84267dfeb9a4378574c6bd5988fc3409d /t/app/controller/rss.t | |
parent | 8e9cd7cdb0a0f0fe591c2ecc25ae480fa0a5f799 (diff) |
In RSS, only escape the necessary five/ctrl chars.
By default encode_entities uses named entities, which don't exist
by default in XML. It seemed nicer to switch to only escaping the
minimum rather than switching to numeric entities.
Diffstat (limited to 't/app/controller/rss.t')
-rw-r--r-- | t/app/controller/rss.t | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t index 5ec7bfae7..171121eaa 100644 --- a/t/app/controller/rss.t +++ b/t/app/controller/rss.t @@ -1,3 +1,4 @@ +use open ':std', ':locale'; use FixMyStreet::TestMech; use FixMyStreet::App; @@ -18,7 +19,7 @@ my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( { bodies_str => '2651', areas => ',11808,135007,14419,134935,2651,20728,', category => 'Street lighting', - title => 'Testing', + title => '&Test’i<n>g \'☃"', detail => 'Testing Detail', used_map => 1, name => $user1->name, @@ -44,7 +45,7 @@ FixMyStreet::override_config { }, sub { $mech->get_ok("/rss/pc/EH11BB/2"); }; -$mech->content_contains( "Testing, 10th October" ); +$mech->content_contains( "&Test’i<n>g '☃", 10th October" ); $mech->content_lacks( 'Nearest road to the pin' ); is $mech->response->header('Access-Control-Allow-Origin'), '*'; @@ -118,7 +119,7 @@ FixMyStreet::override_config { }, sub { $mech->get_ok("/rss/pc/EH11BB/2"); }; -$mech->content_contains( "Testing, 10th October" ); +$mech->content_contains( "&Test’i<n>g '☃", 10th October" ); $mech->content_contains( '18 North Bridge, Edinburgh' ); $report->delete(); |