Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#4325 Fix extra brs in custom field note rich text #26386

Conversation

larssandergreen
Copy link
Contributor

@larssandergreen larssandergreen commented May 31, 2023

Before

image

Extra brs in the rich text and doubled brs in the plain text.

After

image

Paragraphs in the rich text and single brs in the plain text. We let Core/BAO/CustomField add the nl2br.

Comments

I can't figure out how to get into multiRecordDisplay=single mode, so haven't been able to test that. I tested this with a custom field on an Activity, display of custom fields on a Contact appears to be different and does not have this problem.

@civibot
Copy link

civibot bot commented May 31, 2023

No issue was found matching the number given in the pull request title. Please check the issue number.

@civibot
Copy link

civibot bot commented May 31, 2023

(Standard links)

@civibot civibot bot added the master label May 31, 2023
@larssandergreen
Copy link
Contributor Author

unrelated test fail
jenkins, test this please

@demeritcowboy
Copy link
Contributor

I think I was wrong in the ticket about the plain text textarea needing nl2br. Or maybe somewhere else is already adding it in beforehand. It seems like nl2br can be taken out regardless (at least on an activity).

@larssandergreen
Copy link
Contributor Author

@demeritcowboy Yes, it's getting the old double nl2br for good measure, once here as well.

@larssandergreen larssandergreen force-pushed the Fix-extra-brs-in-custom-note-richtext branch from 81beda4 to 2612bc2 Compare May 31, 2023 21:51
@larssandergreen
Copy link
Contributor Author

Pushed a new version that removes the double nl2br, so also improves plain text fields. Updated screenshots.

@demeritcowboy
Copy link
Contributor

For multisingle I think it would be something like this: http://core-26386-3jm2o.test-1.civicrm.org:8001/civicrm/contact/view/cd?reset=1&gid=5&cid=9&recId=1&cgcount=1&multiRecordDisplay=single&mode=view

But you can't have multi custom sets for activities, just contacts.

@demeritcowboy demeritcowboy merged commit 315a4bd into civicrm:master May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants