Tuesday, 23 July 2019 10:04

Google adsense script ins tag stripped out after saving in JCE Joomla

Written by
Rate this item
(1 Vote)

How to fix Adsense stripping out content in Joomla.

If like me you are having an issue whereby when add Google Adsense code and you then save your custom module or article, the <ins> tag section dissappear, then read to get the solution:

  1. Check that your JCE scripts settings are set to allowed
  2. Check which filter type is assigned to your user group.
    Go to Site -> Global Configuration -> Text Filters and you will see this page:

editor filter tags Joomla3


To fix the issue Simply add "&nbsp;" between the <ins> and </ins> tag as follow:

<ins class="adsbygoogle"
     data-ad-slot="7579365756" >&nbsp;</ins>

As the tag is empty, JCE and Joomla automatically assume that it has no use and therefore delete the code. By Adding "&nbsp;", JCE is tricked to believe there is content. Here is what W3C says about the <ins > Tag: https://www.w3.org/TR/html-markup/ins.html#ins

Read 2805 times Last modified on Monday, 23 September 2019 07:09
Login to post comments