Learn Joomla

Extendable CMS platform that allows for seamless creation of basically every type of website!

• Last Updated: 02/12/2020
• ( 4 minutes reading )

How to configure Text Filters in Joomla

Introduction

In this tutorial, we will review the process of configuring the “Text Filters” in Joomla. They allow you to gain more control over the HTML code submitted on your website. You can refer to the Text Fileting settings as a way of enhancing website security and protect it from common attacks. You are allowed to configure the Text Filters exactly per your requirements in order to fit the specific needs of your website.

 

Accessing the Global Configuration page

To begin with, please log in to your Joomla Admin Dashboard and navigate through the top menu bar to System > Global Configuration.

 

Accessing the Global Configuration page

 

Once you access the “Global Configuration” page, please switch to the “Text Filters” tab.

 

Text Filters tab

 

Under the “Text Filters” tab you will see a list of your user groups and you will be able to select the individual filter type, filter tags, and filter attributes for each group.

 

Configuring Text Filters

As you will notice, all groups are already pre-configured by Joomla. However, in some cases that might not be suitable for your needs and cause some dysfunctionalities while customizing your website content. For example, if you are editing an article or Custom HTML module and some restricted tags or attributes are included they might be stripped out.

For each user group, you will be able able to select one of the following “Filter Type” options:

  • Default Blacklist - This option will allow all tags and attributes apart of those included in the blacklist. The tags included in the blacklist are: 'applet', 'body', 'bgsound', 'base', 'basefont', 'canvas', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml'. The attributes included in the blacklist are: 'action', 'background', 'codebase', 'dynsrc', 'lowsrc', 'formaction'. You are allowed to add custom tags and attributes that you would like to blacklist in the corresponding “Filter Tags” and “Filter Attributes” fields. When adding them, please make sure to separate them with commas (,).
  • Custom Blacklist - This option will allow you to override the tags and attributes included in the “Default Blacklist” by adding them into the corresponding “Filter Tags” and “Filter Attributes” fields.
  • Whitelist - This option will allow you to whitelist only specific tags and attributes which you will need to define in the “Filter Tags” and “Filter Attributes” fields.
  • No HTML - This option will remove all HTML tags prior to saving the content. Please note that even if you use a “WYSIWYG” type of editor some HTML tags might be affected when you save the content.
  • No Filtering - This option will let you use any tags or attributes without stripping them out.

 

Configuring Text Filters

 

You might want to consider setting up the “No Filtering” option for the “Administrator” user in addition to the “Super User”.

When you apply the desired changes, please do not forget to click on the “Save” button to record them.

If you are using the TinyMCE editor and your code is still being stripped out. You will need to review the “Prohibited Elements” field and remove the elements you would like to exclude. You can do that by navigating through the top menu bar to Extensions > Plugins. From the list of plugins click on “Editor - TinyMCE”, perform the required changes, and click on “Save”.

Well done! You have learned how to configure the Filtering Settings to meet your specific needs. We hope you have found the information in this tutorial useful. In case you have any further questions, please do not hesitate to address them to our Support Team



...
Sebahat
Content Marketing Specialist

Sebahat is a young and bright woman who has become an invaluable part of our team. She started as a Customer Care Representative, mastering that role and, along the way, growing into a tech-savvy individual who is well acquainted with every support layer of the company. Driven by her aim to improve our customers’ experience constantly, she is committed to enhancing the extraordinary support we deliver.