Title: Errors when using html in protection text area.
Last modified: February 20, 2022

---

# Errors when using html in protection text area.

 *  Resolved [A.T.](https://wordpress.org/support/users/annaryker/)
 * (@annaryker)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/)
 * I created a custom message to be displayed when content is restricted.
    In the
   protection tab, I choose ‘custom message’ and check ‘override default message’.
   I then type html code in the text editor. `<div class="restrict">text</div>`
 * When I check this code in the console, it shows up as:
    `<div class='\"restrict\"'
   >text</div>`
 * I went back to look at the html I entered, and it showed like this in the protection
   tab:
    `<div class="\&quot;restrict\&quot;">text</div>`
 * I corrected the html and clicked update, but it keeps saving wrong.
 * Could this be a bug or an issue with another plugin?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15393569)
 * Hey [@annaryker](https://wordpress.org/support/users/annaryker/),
 * Thanks for posting.
 * We haven’t seen that behavior reported. We’ve helped other customers style their
   custom messages without any problems.
 * Here’s an example of what I’ve got running on my test site.
 * [https://share.wppopupmaker.com/rRuNZ4qj](https://share.wppopupmaker.com/rRuNZ4qj)
 * Maybe it is a plugin conflict? If you need instructions on how to troubleshoot
   that, you can follow this guide.
 * [https://gist.github.com/marklchaves/90f5af8d0ea08d6e54254f2afb1109df](https://gist.github.com/marklchaves/90f5af8d0ea08d6e54254f2afb1109df)
 * Let us know how that goes.
 * Cheers!
    -  This reply was modified 4 years, 3 months ago by [mark l chaves](https://wordpress.org/support/users/mlchaves/).
      Reason: Typo
 *  Thread Starter [A.T.](https://wordpress.org/support/users/annaryker/)
 * (@annaryker)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15396083)
 * Hi [@mlchaves](https://wordpress.org/support/users/mlchaves/)
    in your image 
   you use the default denial message, which works fine on my end also. But when
   I choose the ‘override default message’ option in the restriction editor is when
   I get the error mentioned in my first post. I noticed I’m not the only one with
   this issue. A few support tickets back someone reported the same issue. The title
   of this ticket is ‘Redirect to login and back not working and custom message 
   URLS being corrupted’ and their urls show the same errors as mine. I tried disabling
   all the plugins and the issue persists, so I think this might be a bug.
 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15399295)
 * Hey [@annaryker](https://wordpress.org/support/users/annaryker/),
 * Thanks so much for the follow-up.
 * You mean you’re overriding the default message using the **Restriction** editor
   settings. Gotcha. Sorry I didn’t catch that before.
 * I was able to reproduce that a couple of times. That looks like its intended 
   behavior, but it’s not consistent with the default message editor. Sorry for 
   that inconvenience.
 * We’ll take a closer look at a workaround.
 * Can you please open up a ticket via our contact form?
 * [https://code-atlantic.com/contact-us/](https://code-atlantic.com/contact-us/)
 * That way we can get this issue logged in our system and get back to you with 
   a workaround if possible.
 * Cheers!
 *  Thread Starter [A.T.](https://wordpress.org/support/users/annaryker/)
 * (@annaryker)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15399411)
 * Thank you [@mlchaves](https://wordpress.org/support/users/mlchaves/).
    I opened
   a ticket on the link you provided. I’ll use the default denial message for now.
 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15404144)
 * Hi [@annaryker](https://wordpress.org/support/users/annaryker/),
 * Got it and we replied.
 * Closing this thread here.
 * Cheers!
 *  Plugin Support [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * (@mlchaves)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15425894)
 * Hey everybody,
 * If you see this encoding issue when you’re using a custom message override, please
   click **Save Changes** on the Content Control **Settings** page before moving
   away or reloading that page.
 * This is the workaround for now until we get a permanent fix.
 * Here’s a demo of the workaround.
 * [https://share.wppopupmaker.com/geudnGR1](https://share.wppopupmaker.com/geudnGR1)
 * Thanks so much 🙂
    -  This reply was modified 4 years, 3 months ago by [mark l chaves](https://wordpress.org/support/users/mlchaves/).
      Reason: Clarification

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Errors when using html in protection text area.’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

## Tags

 * [custom message](https://wordpress.org/support/topic-tag/custom-message/)
 * [encoding](https://wordpress.org/support/topic-tag/encoding/)

 * 6 replies
 * 2 participants
 * Last reply from: [mark l chaves](https://wordpress.org/support/users/mlchaves/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/errors-when-using-html-in-protection-text-area/#post-15425894)
 * Status: resolved