Change WordPress user roles and capabilities › Forums › Bug Reports › wordpress multisite unfiltered_html issue › Reply To: wordpress multisite unfiltered_html issue
I found the reason why unfiltered_html works fine from the classic editor, but does not from the Gutenberg. Fortunately, it belongs not to the Gutenberg, but to URE Pro itself. It applied ‘unfiltered_html’ for WordPress admin only using is_admin() function. But Gutenberg saves changes via WP Rest API using AJAX. Admin screen is not defined in this case.
I will include the fix into the next update.
Quick fix: open user-role-editor-pro/pro/includes/classes/user-role-editor-pro.php, go to the line #263 (located inside function allow_unfiltered_html()) and replace this code:
if ( !$multisite || !is_admin() ||
with
if ( !$multisite ||
to get finally
if ( !$multisite ||
( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) ) {
return;
}