Skip to:
Content
Pages
Categories
Search
Top
Bottom

Image not saving in xprofile textarea field


  • jbboro3
    Participant

    @jbboro3

    Hello,

    I’ve been trying to remove the strips on images on xprofile textarea fields (as I set the add media button on tinymce editor). I can upload, position and everything but it simply doesn’t save it.. There must be somewhere it’s not allowing to save images and other scripts for security purposes. But I need this feature must as for my current project..

    If someone can point me the core files where I can look for that is not allowing to save images or stripping the images and other tags, that would be very much helpful.. I totally want to remove the entire strip tags that will support all the tags including image and iframes etc.,

    Somewhat tried with: remove_filter( ‘xprofile_get_field_data’, ‘wp_filter_kses’, 1 );

    but still it’s not saving the data.. can someone help me to better implement the above code?

    I’m in desperate need of solution as possibly as I could get.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • “get” filters don’t modify data on input/on save, which is when KSES is normally run.
    Off-hand I don’t know which filter does this, I’d suggest looking through the top of the bp-xprofile-filters.php file and comment them out until you find the one that lets you do what you want.

    Then hopefully you/we can modify that filter, somehow, once we know which one it is. You don’t want to remove KSES entirely, this is unsafe and will let people hack your site.


    rgilman
    Participant

    @rgilman

    Any solution to this? I also need images to be allowed in xprofile text fields.


    rgilman
    Participant

    @rgilman

    @djpaul I’ve been digging into this and found the filter that’s overriding the ability to expand the permitted tags in xprofile textareas. It’s on line 19 in bp-xprofile-filters.php and adds wp_filter_kses to bp_get_the_profile_field_edit_value.

    I can fix this for my own purposes with a remove_filter call but this does look like a bug. Using wp_filter_kses instead of xprofile_filter_kses defeats the expansion of the tag set. The fact that this is invoked in a ‘get’ is also odd.

    What’s the best way for me to submit a bug report on this?


    Venutius
    Moderator

    @venutius

    You can report bugs via Trac: https://buddypress.trac.wordpress.org/


    rgilman
    Participant

    @rgilman

    Done. Ticket #8094


    vicki24
    Participant

    @vicki24

    I’d suggest looking through the top of the bp-xprofile-filters.php file and comment them out until you find the one that lets you do what you want.

    Then hopefully you/we can modify that filter, somehow, once we know which one it is.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar