diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-09-28 10:58:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-09-28 17:58:44 +0100 |
commit | a8eb8d3a3a1df337a1ebc73adf56f243de31d9e5 (patch) | |
tree | 7476412150d325e867c360a2a39b481200b3e0f5 /perllib/FixMyStreet/App | |
parent | 9e3abbbe4a69b4ab1d743b0b2e7e24ff4ac45ac2 (diff) |
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.
Diffstat (limited to 'perllib/FixMyStreet/App')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Questionnaire.pm | 2 |
1 files changed, 2 insertions, 0 deletions
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'; |