• Resolved kkow

    (@kkow)


    Hi,

    Can we please have a way to disable the “ACF now automatically escapes unsafe HTML when rendered by?the_field?or the ACF shortcode. We’ve detected the output of some of your fields has been modified by this change, but this may not be a breaking change.” notice? My fields are fine and output is perfectly normal. I can close out of the notice but then it comes right back.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ditto. I just came to the forum to post this same request. When it does indeed turn out to be a non-breaking change and everything is working fine and safely after the change, it would be great to be able to turn off the nag notification. Something like…

    ?? Yes, I swear, I have checked and the change did not break anything and everything is safe. Please turn off the reminder.

    Whenever we detect that escaping the field value has modified the output value, ACF will log data about the affected function call. …

    This log is stored as an option in the?wp_options?table. Whenever this log contains entries, the notices in WordPress admin will be shown for all users with the “Editor” role and higher by default.

    Admin users have the ability to dismiss the message, which will also clear the log. Dismissing the notice after you’ve made fixes will allow you to verify you’ve fixed every instance, as the message will not return after the affected pages have been loaded.

    [But if no fixes are needed and you don’t change the underlying code…]

    If you want to disable the error messages entirely, this is also possible via the following filter:

    add_filter( 'acf/admin/prevent_escaped_html_notice', '__return_true' );

    This filter will also disable the log being populated when set to true. You can hide the notice on admin pages while retaining the log system on the front-end by ensuring you only add the filter in an?is_admin()?check, and including the necessary logic to limit it to specific users or roles.

    ACF 6.2.5 Security Release

    So yes, it seems that there is a mechanism for disabling the notice without making code changes to the effected templates. But a simple checkbox to accomplish this without the need to add code to the functions.php file would be a nice courtesy.

    I too came here to ask how to dismiss the notice permanently. Should there not be a solution to do this without adding a filter code?

    Hi @tezalsec, @hommealone, @kkow

    ACF Support Team here. This forum is generally used by ACF users to help each other out. 

    However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ?support form and we can look into it further.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable Notice’ is closed to new replies.