Email Protector

Empty style tags generated by Joomla head.php

3 years 4 months ago #40711

Jip Jonker's Avatar Jip Jonker

Hi! I noticed these empty style tags in my template:

<style type="text/css"></style>

These style tags are generated by libraries\joomla\document\html\renderer\head.php. (code for the <jdoc:include type="head" /></head> Joomla tag).

Since they are empty I checked to see why they are put in the template. I found out htat hsi only happens when the System - NoNumber Regular Labs Email Protector plugin is turned on. The tags do not show up when tis plugin is turned off.

The head.php checks the $document->_styles array to see if there are any styles in there and based upon that i outputs the tags. When I echo the $document->_styles I see:

Array ( [text/css] => /STAR START: Email Protector styles STAR/ .cloaked_email span:before { content: attr(data-ep-aa0dc); } .cloaked_email span:after { content: attr(data-ep-b3c41); } /STAR END: Email Protector styles STAR/ )

(STAR = *)

So there are some style put in there by the cloak plugin. Btt they are not rendered into the style tags. Maybe the comments are causing this?

My question: Should the colaked_email styles show up between the style tags? And if not, why do I see the empty tags?

Joomla 3.4 and latest version of the cloak plugin.

Kind regards,
Jip Jonker

3 years 4 months ago #40712

Peter van Westen's Avatar Peter van Westen Admin

Yes, they should. Are there any email addresses on the page?
Do you have this online so I can have a look?

3 years 4 months ago #40727

Jip Jonker's Avatar Jip Jonker

www.frieslandzorg.inxpact.nl/

When I add an e-mailadress to the page this shows up:
<style type="text/css">
.cloaked_email span:before { content: attr(data-ep-a4f1c); } .cloaked_email span:after { content: attr(data-ep-b0158); }
</style>

With no e-mail on the page only the empty style tags are shown.

3 years 4 months ago #40732

Peter van Westen's Avatar Peter van Westen Admin

Email Protector adds the inline styling at the start of the process and removes it when it does not find any email addresses in the final html output.

If you find the empty style tag an issue (which it isn't), you can use ReReplacer to remove it.

3 years 4 months ago #40762

Jip Jonker's Avatar Jip Jonker

It's not a big issue for me. I was just wondering what happend there... I will take a look a what ReReplacer can do exactly. Have not used that before.

Kind regards, Jip.