Skip to:
Content
Pages
Categories
Search
Top
Bottom

Line breaks in profile textarea field


  • sebastian
    Participant

    @sebastian1

    Hi,

    does anyone know a solution to retain line breaks in the public profile view?

    In the edit-mode textarea, the line breaks are retained, but for some reason they are not retained in text mode. I have tried nl2br in profile-loop, etc. but it seems like BuddyPress strips the n and r after getting the data from the database. In the database itself I can see the n ‘s and r ‘s.

    Any ideas on this?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)

  • Boone Gorges
    Keymaster

    @boonebgorges

    BuddyPress applies the wpautop filter when it displays xprofile field data. So what is stored in the db as `/n` or `/r` should be converted to `

    ` on the way out. If you’re not seeing line breaks at all, it could be one of two things: 1) your stylesheet is displaying paragraphs as inline elements, or 2) something in a plugin or theme is turning off wpautop. What happens when you deactivate plugins and use bp-default?


    sebastian
    Participant

    @sebastian1

    Thanks a lot – it works now!

    The Custom Profile Filters plugin was causing the problem. I modified the strip_tags in “custom-profile-filters-for-buddypress-bp-functions.php” to allow `

    ` and `
    ` tags.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Line breaks in profile textarea field’ is closed to new replies.
Skip to toolbar