Content saved by users dissapears (3 posts)

  1. merren
    Posted 2 years 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
    Posted 2 years 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:

  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.

Topic Closed

This topic has been closed to new replies.

About this Topic