• Hi Edward! I’m working on a page that will be broadcast to several network sites.

    On these network sites I have a custom field called additional_content – it’s an ACF WYSIWYG field. The field does NOT exist on the parent site – just the children.

    The field is there for content managers to add additional content beyond what has been broadcast. It is set to display at the bottom of a custom page template.

    The issue I’m finding is that, when saving the parent version, the HTML gets stripped out of this custom field on the child site.

    For example, if I have a few paragraphs of text in this field, the p tags are removed when I save the parent.

    I’ve placed the additional_content field in the Custom Field Protectlist, along with the Custom Field Blacklist on the parent site.

    Do you know why the HTML is being stripped from the field?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    I’m guessing it’s because the user is not allowed to save html. This is a filter in WP called kses or something. Try removing it using this snippet:

    add_action( 'threewp_broadcast_broadcasting_started', function()
    {
     kses_remove_filters();
    } );
    Thread Starter Eric Karkovack

    (@karks88)

    Thanks, @edward_plainview!

    So, trying this did not seem to make a difference. I’m testing this locally as a Super Admin, if that helps.

    Here’s something I do notice when saving the parent page:

    1. I save the parent page.
    2. On the child site, I open up the page editor and see that the WYSIWYG field has changed from “Visual” to “Text”. The text is still separated into paragraphs (HTML doesn’t show here, but it doesn’t usually).
    3. If I switch the field back to the Visual editor and re-save, the formatting shows again on the front-end.

    We have the Advanced Editor Tools plugin active on the network. I did find a workaround by using their “Keep paragraph tags in the Classic block and the Classic Editor” setting.

    Plugin Author edward_plainview

    (@edward_plainview)

    Good on you for finding that workaround.

    Marking as resolved and hoping that other users of that plugin find this thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML Being Stripped from a Custom Field after Broadcasting’ is closed to new replies.