From a8eb8d3a3a1df337a1ebc73adf56f243de31d9e5 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 28 Sep 2015 10:58:30 +0100 Subject: Process update left as part of questionnaire. Treat an update left during a questionnaire the same as one left on a report page, ie. pass it through cleanup_text. This will also make sure updates left that are wholly whitespace are errored, or replaced with the default text. --- perllib/FixMyStreet/App/Controller/Questionnaire.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perllib/FixMyStreet/App/Controller/Questionnaire.pm') diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm index 035cab3a6..8fe2514c0 100755 --- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm +++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm @@ -234,6 +234,8 @@ sub process_questionnaire : Private { map { $c->stash->{$_} = $c->get_param($_) || '' } qw(been_fixed reported another update); + $c->stash->{update} = Utils::cleanup_text($c->stash->{update}, { allow_multiline => 1 }); + # EHA questionnaires done for you if ($c->cobrand->moniker eq 'emptyhomes') { $c->stash->{another} = $c->stash->{num_questionnaire}==1 ? 'Yes' : 'No'; -- cgit v1.2.3