View Activity: extraneous newlines by nl2br on HTML content
This a regression that was caused a while back by #2 (closed) (for I take responsibility, since I mentored/reviewed). We added a nl2br that was a bit too bread in scope, but should have only affected Inbound HTML activities.
How to reproduce on http://dcase.demo.civicrm.org :
- Go to a contact record
- Create an activity
- In the details field, add 3 separate lines (by hitting 'enter' once, to create a new paragraph).
In the above, you can see that "Line 1" and "Line 2" have a lot of space between them. Inspecting the HTML, it shows that some extra 'br' tags were added between the paragraphs.
If we edit the activity again, the HTML looks OK:
(the newlines in the above screenshot are what made me assume this is a nl2br bug)
PS: this issue was initially reported here: https://github.com/civicrm/org.civicrm.civicase/issues/116 -- but it is not specific to civicase v5.
cc @Detlev