bug history/activity shouldn't collapse multi-line values to a single line

RESOLVED FIXED in Bugzilla 5.0

Status

()

Bugzilla
User Interface
--
minor
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: glob)

Tracking

unspecified
Bugzilla 5.0
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

4 years ago
if you have a custom textarea, when viewing a bug's history the field's contents are always shown on a single line, making it difficult to read.

bugzilla should honour line breaks when displaying activity entries.
(Assignee)

Comment 1

4 years ago
Created attachment 820170 [details] [diff] [review]
929345_1.patch
Attachment #820170 - Flags: review?(dkl)
Comment on attachment 820170 [details] [diff] [review]
929345_1.patch

Review of attachment 820170 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good (and familiar) and works well. r=dkl
Attachment #820170 - Flags: review?(dkl) → review+

Updated

4 years ago
Flags: approval?
Flags: approval4.4?

Comment 3

4 years ago
Comment on attachment 820170 [details] [diff] [review]
929345_1.patch

Template Toolkit already has a builtin html_line_break filter which does exactly that.
Attachment #820170 - Flags: review-

Updated

4 years ago
Flags: approval?
Flags: approval4.4?
(Assignee)

Comment 4

4 years ago
Created attachment 823346 [details] [diff] [review]
929345_2.patch

thanks lpsolit :)
Attachment #820170 - Attachment is obsolete: true
Attachment #823346 - Flags: review?(simon)

Comment 5

4 years ago
Comment on attachment 823346 [details] [diff] [review]
929345_2.patch

No, html_line_break simply converts \n into <br>. It does no escaping. So you need to write:

  [% foo FILTER html FILTER html_line_break %]

The order of the filters is important (else <br> would be escaped too).
Attachment #823346 - Flags: review?(simon) → review-
(Assignee)

Comment 6

4 years ago
Created attachment 823361 [details] [diff] [review]
929345_3.patch
Attachment #823346 - Attachment is obsolete: true
Attachment #823361 - Flags: review?(LpSolit)

Comment 7

4 years ago
Comment on attachment 823361 [details] [diff] [review]
929345_3.patch

r=LpSolit
Attachment #823361 - Flags: review?(LpSolit) → review+

Updated

4 years ago
Flags: approval?

Updated

4 years ago
Flags: approval? → approval+

Comment 8

4 years ago
Target milestone?
(Assignee)

Comment 9

4 years ago
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/bug/activity/table.html.tmpl
Committed revision 8816.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 5.0
You need to log in before you can comment on or make changes to this bug.