How do I allow Iframes in Knowledgebase articles?
This guide has been written for HESK version 2.7.3+.
Warning! Unrestricted use of iframes can be a potential security issue. Use at your own risk and only if you 100% trust anyone with access to your help desk staff control panel.
By default, HTMLPurifier, used by HESK to sanitize HTML code, will strip out any iframe code. This guide will show you how to enable full support for iframes, if you want to use them in Knowledgebase articles and Service messages.
That said, here are the steps:
- Backup your existing HESK files
- Download and install this powerful free text editor: Notepad++ .
- Open file inc/htmlpurifier/custom/heskIframe.php in Notepad++
- Inside find this exact code:
- Replace it with:
return '<iframe ' . $matches . '></iframe>';
- Save the file and upload it to the server (overwrite the original one)
- Login into HESK administration
- Test the changes by adding a Knowledgebase article with an iframe