Allowing unsafe HTML in articles

By default, Help Center quarantines unsafe HTML tags and attributes in articles to reduce the risk of somebody introducing malicious code. See the list of safe tags and attributes below.

The unsafe HTML is not stripped from the articles on the server. Rather, it's not included in the HTTP responses sent to browsers. As a result, articles might not render as intended in browsers. You can override the default setting to allow all the article HTML to be sent to a browser.

Warning: Making this change will allow potentially malicious code to be executed when users open an article in a browser.

Note: Even if Help Center doesn't strip safe tags, the third-party HTML article editor used in Help Center (TinyMCE) may strip some safe tags from the HTML. For example, the editor removes <i> tags with no content, such as those used for Font Awesome icons.

There are some "hacky" way to get Font Awesome to work, such as utilizing <div> or <p> tags instead of <i> tags. In some testing this seems to have worked but we cannot guarantee it as a workaround because as stated Font Awesome is not really supported in help center.

New to Zendesk so bear with me. I'm trying to edit the source code of a particular article (specifically, I am trying to wrap a <p> element within <a> elements to make the entire piece clickable - which is pretty common), but the changes I make are getting stripped out. I assumed it has something to do with TinyMCE, but is there a way to prevent this? Is it only stripping in the preview and it will save in production?

I also have a problem with the article editor stripping an <a> element. I have an article that contains a link to a form, and I need it to be a clickable image with no text. I put the code below into the article (the <a> is inside a <div>):

When I saved the article and then opened it again, the <a> element was gone. I figured out that the <a> isn't removed if it has text, so my workaround is that I put the following code in the article, and use jquery to remove text from any element with the remove-text class:

It looks like this is actually expected behavior as mentioned in this article. The 3rd party article editor (TinyMCE) the Help Center uses may strip some safe tags from the HTML. This will include the <a> tag as you're experiencing on your end.

Hi Brett, what seems strange to me is that the article editor strips the <a> element if it contains no text, but doesn't strip it if it contains text. This seems more like a bug than expected behavior.

I did some additional digging and it looks like in general if there's an empty tag it's removed. In this case your <a> tag is empty so TinyMCE removes it from the article editor. This external article on Stack Overflow mentions this as well: how to prevent tinymce from stripping empty tags from input?.

Hi Brett, thanks for the Stack Overflow article. I used the suggested solution of putting &nbsp; in the <a> element, and then the article editor didn't strip the <a> element. Using the nbsp; is a much better workaround than putting in text that I had to remove with jquery.

A small addendum to this: when I hovered over the link, the &nbsp appeared as a dash:So I had to use CSS with font-size: 0px to hide it. I couldn't use visibility or opacity to hide it, as that also affected the image that is displayed in the link.

Any idea how to make my table bigger while I am viewing it and not while I am editing it? I've set my table width to 1000 but when I go to view it as normal user, the table is still small.

This is in the editor

And this is in normal view

I understand that maybe this is happening because in the right side of the page there is the "recently viewed articles" area and maybe it prevents the table to become bigger. I am definitely not an html expert, so any advice would be appreciated.

This looks like a CSS issue, but its really hard to figure out what needs adjusting without being able to see a live version of the page. Do you have a link to the help centre with this kind of issue on display?