Title: Sanitizing code on custom user types
Last modified: January 30, 2019

---

# Sanitizing code on custom user types

 *  Resolved [aus-tn](https://wordpress.org/support/users/austintn/)
 * (@austintn)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/sanitizing-code-on-custom-user-types/)
 * 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 7 years, 4 months ago by [aus-tn](https://wordpress.org/support/users/austintn/).
      Reason: Issue with TinyMCE not plugin

The topic ‘Sanitizing code on custom user types’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/acf-code-field_2b393f.svg)
 * [ACF Code Field](https://wordpress.org/plugins/acf-code-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-code-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-code-field/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-code-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-code-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-code-field/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [aus-tn](https://wordpress.org/support/users/austintn/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/sanitizing-code-on-custom-user-types/)
 * Status: resolved