WordPress.org

Ready to get started?Download WordPress

Forums

Content saved by users dissapears (3 posts)

  1. merren
    Member
    Posted 3 months ago #

    I'm creating a multisite where users can edit content in the frontend of their blog,
    Somehow only the content saved by SuperAdmin is correctly saved

    If I make a new user, with role editor or admin he's able to save content, but not all of the information is stored! (The basic idea is that a user can drag and drop stuff )

    Content saved by super admin:
    <div class="grid" id="my_canvas"><div class="canvalicious" style="border-width: 1px; left: 140px; top: 210px; position: absolute;" id="content_3841401130551434">

    Content saved by other users with role admin:
    <div class="grid" id="my_canvas"><div class="canvalicious" style="border-width: 1px;height: 470px;width: 420px" id="content_3841401130551434">

    I use the wp_update_post function to save the content trough ajax to wordpress

    Does anyone have a clue?

  2. merren
    Member
    Posted 3 months ago #

    It appears that the div style attribute isn't beeing stripped by the "unfiltered_html" privilege that a superuser has, but is stripped for the other user roles..

    This solved my problem:
    http://wordpress.org/support/topic/wp_update_post-strips-css-id-attribute
    http://premium.wpmudev.org/forums/topic/div-ids-being-stripped-out-any-ideas

  3. Be very very very very super cautious when you change unfiltered HTML settings on a multisite, as it is potentially VERY dangerous.

    I would sooner lend someone my car.... Maybe.

    Anyway. I would not ever do this. I would make them a shortcode, or find some other way to remove the need for divs in the first place.

Reply

You must log in to post.

About this Topic