diff options
author | matthew <matthew> | 2008-09-17 17:17:29 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-09-17 17:17:29 +0000 |
commit | c3f19f124d7b12746d8adb1dfad5a558134d9846 (patch) | |
tree | c58dab16f413111fa88bccedaeda3f86e5c1558a | |
parent | 5fe5ed5a60d71500911cf2c769a211baee423c65 (diff) |
Take note of paragraph breaks in detail.
-rw-r--r-- | perllib/Page.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm index 2d123d903..d7ed0f51a 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.111 2008-09-17 14:55:48 matthew Exp $ +# $Id: Page.pm,v 1.112 2008-09-17 17:17:29 matthew Exp $ # package Page; @@ -594,9 +594,12 @@ sub display_problem_text { } elsif ($q->{site} ne 'emptyhomes') { $out .= $q->br() . $q->small('Not reported to council'); } - $out .= '</em></p> <p>'; - $out .= ent($problem->{detail}); - $out .= '</p>'; + $out .= '</em></p>'; + my $detail = $problem->{detail}; + $detail =~ s/\r//g; + foreach (split /\n{2,}/, $detail) { + $out .= '<p>' . ent($_) . '</p>'; + } if ($problem->{photo}) { $out .= '<p align="center"><img src="/photo?id=' . $problem->{id} . '"></p>'; |