Support » Plugin: ACF Code Field » Sanitizing code on custom user types

  • Resolved aus-tn

    (@austintn)


    When logged in as a custom user type (registered in plugin), even with admin level permissions;

    function add_roles_on_plugin_activation_tester() {
    	add_role( 'tester', ' Tester', array(
            'activate_plugins' => false,
            'delete_others_pages' => true,
            'delete_others_posts' => true,
            'delete_pages' => true,
            'delete_posts' => true,
            'delete_private_pages' => true,
            'delete_private_posts' => true,
            'delete_published_pages' => true,
            'delete_published_posts' => true,
            'edit_dashboard' => true,
            'edit_others_pages' => true,
            'edit_others_posts' => true,
            'edit_pages' => true,
            'edit_posts' => true,
            'edit_private_pages' => true,
            'edit_private_posts' => true,
            'edit_published_pages' => true,
            'edit_published_posts' => true,
            'edit_theme_options' => true,
            'export' => false,
            'import' => false,
            'list_users' => false,
            'manage_categories' => false,
            'manage_links' => true,
            'manage_options' => true,
            'moderate_comments' => false,
            'promote_users' => false,
            'publish_pages' => true,
            'publish_posts' => true,
            'read_private_pages' => true,
            'read_private_posts' => true,
            'read' => true,
            'remove_users' => false,
            'switch_themes' => false,
            'upload_files' => true,
            'customize' => true,
            'delete_site' => false,
            'level_1' => true
    	) );
    }
    register_activation_hook( __FILE__, 'add_roles_on_plugin_activation_tester' );

    Upon saving, <style> stags are stripped and certain characters such as < are encoded.This does not occur with default user types such as ‘admin’, or ‘editor’.

    I’m using ACF ver. 5.7.10, and version 1.7 of this plugin.

    • This topic was modified 10 months, 1 week ago by aus-tn. Reason: Issue with TinyMCE not plugin
  • The topic ‘Sanitizing code on custom user types’ is closed to new replies.