Title: Content Permission: HTML code in custom error message
Last modified: August 22, 2016

---

# Content Permission: HTML code in custom error message

 *  [ste_yeu](https://wordpress.org/support/users/ste_yeu/)
 * (@ste_yeu)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/content-permission-html-code-in-custom-error-message/)
 * If you need to insert html tags in your custom error message, you have to edit
   this file: plugins/members/includes/**content-permissions.php**
 * Search this line:
 * `return apply_filters( 'members_post_error_message', $return );`
 * and replace with:
 * `return htmlspecialchars_decode( 'members_post_error_message', $return );`
 * [https://wordpress.org/plugins/members/](https://wordpress.org/plugins/members/)

Viewing 1 replies (of 1 total)

 *  [Andrei G.](https://wordpress.org/support/users/27shutterclicks/)
 * (@27shutterclicks)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/content-permission-html-code-in-custom-error-message/#post-5354128)
 * While editing that file will do the trick, it’s bad form to edit the plugin file
   directly. That means that whenever the plugin will get updated, you will lose
   this change.
 * The better way to go about it, is to actually make use of the filter that is 
   made available to you, by adding the following to the functions.php of your theme:
 *     ```
       //Allow HTML to be used in the Custom Error Message area for Content Permissions (Members plugin)
       add_filter('members_post_error_message', 'decode_members_custom_error_html', 10, 1);
       function decode_members_custom_error_html($return) {
       	return htmlspecialchars_decode($return);	
   
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Content Permission: HTML code in custom error message’ is closed to new
replies.

 * ![](https://ps.w.org/members/assets/icon-256x256.png?rev=3508404)
 * [Members - Membership & User Role Editor Plugin](https://wordpress.org/plugins/members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/members/)
 * [Active Topics](https://wordpress.org/support/plugin/members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/members/reviews/)

## Tags

 * [custom error message](https://wordpress.org/support/topic-tag/custom-error-message/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [Members plugin](https://wordpress.org/support/topic-tag/members-plugin/)

 * 1 reply
 * 2 participants
 * Last reply from: [Andrei G.](https://wordpress.org/support/users/27shutterclicks/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/content-permission-html-code-in-custom-error-message/#post-5354128)
 * Status: not resolved