Answers.Body: <p>Oh I get it now. You mean <code>&lt;br&gt;</code> tags in the html source when you are in view mode causing extra line spacing to appear on the screen, not the literal <code>&lt;br&gt;</code> appearing as a visible string <code>&lt;br&gt;</code> on the screen.</p>
  
  <p>So I personally agree that's not a faithful representation of the stored html which normally ignores whitespace when displayed, but it looks like it's been that way for a long time. Where this is coming from is <a href="https://issues.civicrm.org/jira/browse/CRM-11598" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-11598</a> which doesn't specifically say it but I'm assuming it's referring to when you choose TextArea as the type for the Note field, where you <em>would</em> want this. The code looks like it's here: <a href="https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Custom/Page/CustomDataView.tpl#L90" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Custom/Page/CustomDataView.tpl#L90</a></p>
  
  <p>So ideally it would also check to see whether it's TextArea or RichText. You can file a bug report at <a href="https://lab.civicrm.org/dev/core/issues" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-10T22:29:53.187Z
Answers.Text: I know this is a year old, but I think we just ran into this issue. Was a bug ever filed and worked on? Seems like it's still happening in version 5.27
Answers.UserDisplayName: Paul B
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-31T14:33:24.570Z
Answers.Text: I just logged it. Been bugging me for years. I thought it might be a config issue so never bother looking into it.
  
  https://lab.civicrm.org/dev/core/-/issues/4325
Answers.UserDisplayName: dtw
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-01T13:42:17.093Z
Answers.Text: This is the fix if you want to apply it manually https://github.com/civicrm/civicrm-core/pull/26386/commits/2612bc27fc14d453f328332bbf5aaeb4d6527cd3
Answers.UserDisplayName: dtw
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-02T05:28:20.767Z
Answers.LastActivityDate: 2019-08-02T05:28:20.767Z
Answers.UserDisplayName: Demerit
Body: <p>I am looking at a site where there is an extra <code>&lt;br&gt;</code> tag being inserted between all elements in rich-text fields in custom fieldsets, including between list items! And two being inserted between paragraphs. The html is clean in the editor, but this is how it's being rendered on the front-end. This is <strong>only</strong> happening when the fieldset is set to display as a tab. As soon as you move it 'inline', the problem goes away. Site is using default CKEditor. </p>
  
  <p>Any ideas about why this could be happening and how to fix it? Thank you. </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-01T21:40:27.437Z
Comments.Text: I'm not seeing this happen on the public demo https://dmaster.demo.civicrm.org. Any more details about what might be specific to your install? Which version of civi? Which CMS? Any relevant extensions?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-08-02T04:51:18.570Z
Comments.Text: Thanks for checking this out. I have just tried this on the demo site and I can confirm it is happening. I added a custom field set to contacts, which I set to appear in a tab, then a 'note' type field and set it to be rich text. On a contact record, I added a couple of paragraphs (by hitting return between them) - looks good on the backend, but 2 x `<br>` tags between each `<p>` appearing on the front-end.
Comments.UserDisplayName: Katy J
Tags: <custom-fields><ckeditor><html>
Title: <br> tags inserted in rich text fields custom fieldsets when displayed as tabs
ThreadText: # <br> tags inserted in rich text fields custom fieldsets when displayed as tabs
  
  (Asked by: username_0 on 2019-07-29)
  
  I am looking at a site where there is an extra  tag being inserted between all elements in rich-text fields in custom fieldsets, including between list items! And two being inserted between paragraphs. The html is clean in the editor, but this is how it's being rendered on the front-end. This is **only** happening when the fieldset is set to display as a tab. As soon as you move it 'inline', the problem goes away. Site is using default CKEditor.
  
  Any ideas about why this could be happening and how to fix it? Thank you.
  
  **Tags:** custom-fields, ckeditor, html
  
  > **Comments:**
  > **username_1**: I'm not seeing this happen on the public demo https://dmaster.demo.civicrm.org. Any more details about what might be specific to your install? Which version of civi? Which CMS? Any relevant extensions?  
  > **username_0**: Thanks for checking this out. I have just tried this on the demo site and I can confirm it is happening. I added a custom field set to contacts, which I set to appear in a tab, then a 'note' type field and set it to be rich text. On a contact record, I added a couple of paragraphs (by hitting return between them) - looks good on the backend, but 2 x `<br>` tags between each `<p>` appearing on the front-end.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-08-02. Score: 1
  
  Oh I get it now. You mean  tags in the html source when you are in view mode causing extra line spacing to appear on the screen, not the literal  appearing as a visible string  on the screen.
  
  So I personally agree that's not a faithful representation of the stored html which normally ignores whitespace when displayed, but it looks like it's been that way for a long time. Where this is coming from is <https://issues.civicrm.org/jira/browse/CRM-11598> which doesn't specifically say it but I'm assuming it's referring to when you choose TextArea as the type for the Note field, where you *would* want this. The code looks like it's here: <https://github.com/civicrm/civicrm-core/blob/master/templates/CRM/Custom/Page/CustomDataView.tpl#L90>
  
  So ideally it would also check to see whether it's TextArea or RichText. You can file a bug report at <https://lab.civicrm.org/dev/core/issues>
  
  > **Comments:**
  > **username_2**: I know this is a year old, but I think we just ran into this issue. Was a bug ever filed and worked on? Seems like it's still happening in version 5.27  
  > **username_3**: I just logged it. Been bugging me for years. I thought it might be a config issue so never bother looking into it.  https://lab.civicrm.org/dev/core/-/issues/4325  
  > **username_3**: This is the fix if you want to apply it manually https://github.com/civicrm/civicrm-core/pull/26386/commits/2612bc27fc14d453f328332bbf5aaeb4d6527cd3  
  
  ---
  
  