Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 929
    • Issues 929
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #379

Closed
Open
Opened Sep 05, 2018 by bgm@bgmOwner

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).

44817615-028c1d00-abb4-11e8-9eba-07b9eb96c029

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:

44817687-3109f800-abb4-11e8-88a4-dccb3b1b957e

(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

Edited Sep 05, 2018 by bgm
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
5.7
Milestone
5.7
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#379