question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline Profile property does not "render" breaks on user profile page

See original GitHub issue

Description of problem

When you set a Profile property field to “Multi Line Text” and you add this to the user profile page the entered breaks are not visible.

Description of solution

IMO we should replace “\n” with “
”, so the entered breaks are visible when shown in the profile. I know this is a change, but if we don’t change this, what’s the use of the “Multi-Line Text” type…?

As all properties seem to be handled here: https://github.com/dnnsoftware/Dnn.Platform/blob/34a5a5582c394d45e76baec656ada86d3078453c/DNN Platform/Library/Entities/Users/Profile/ProfilePropertyAccess.cs#L193

I would suggest to add an option for “Multi-Line Text” in there and add a .Replace(“\n”, “
”).

Reproduce.

  1. Set a profile property (Biography) to “Multi Line Text”

image

  1. Edit a user profile and add this text as Biography.
-------------
Test1
Test2
Test3
-------------
  1. Visit the User Profile page of that user.
  2. Edit the “ViewProfile” module’s Template and add: [PROFILE:BIOGRAPHY]
  3. After the page has reloaded you will see that the entered breaks are not shown. (as obviously “\n” is not a break in HTML)

image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
valadascommented, Sep 7, 2021

Yeah I can reproduce in 9.10.1

1reaction
WillStrohlcommented, Feb 12, 2021

I had to do something similar in another issue/PR: https://github.com/dnnsoftware/Dnn.Platform/pull/4186

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to display with HTML format (Rich text) of a User ...
I am working on a custom people search page, one of requirement is about to populate a rich text user property created in...
Read more >
How do you handle multiline text and line breaks in HTML?
Learn how to use wrap, white-space, , escape sequences, and HTML entities to handle multiline text and line breaks in HTML textarea and...
Read more >
Report layout get spoiled with multiline data.
Hello Friends, My report's layout get spoiled after setting "Can Grow" property (Fileds) and "Extend To Bottom Of Section" property (line) ...
Read more >
Allow multi-line String properties in the Properties window
I've got a Windows Form User Control with a string property for setting the text of a textbox. This string can be multi-line....
Read more >
MS Word field multiline
My issue is that the "title" property contains text that is long enough to take two or three lines. I want these lines...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found