Preserving whitespace from bp profile fields
-
Sorry, I feel such a newb asking this, but it’s currently defeating me, so…
I have an “About you” profile field which has the format Multi-Line Text Area.
If the user writes a little about themselves and includes line-breaks, it looks as expected in the database table.
Any variation of BuddyPress functions I use to retrieve the field for display in a template (e.g.
$about = xprofile_get_field_data( 14, $user_id );
) gives the same result when echoed.The raw source HTML has the linebreaks, but the whitespace including linebreaks is of course ignored when rendered on-screen.
I know there are all kinds of text escaping functions and presumably I should be using one of them, but I don’t know where to start if anyone has any tips (or links to good reference material or tutorials).
Thanks
- The topic ‘Preserving whitespace from bp profile fields’ is closed to new replies.