No Code Attached Yet bug
avatar ChristineWk
ChristineWk
9 Mar 2025

Steps to reproduce the issue

Users use e-mail address with an underscore.

Additional comments

If the e-mail obfuscation is turned off, it works, but that shouldn't be the case.
Feature request:
The pattern string would have to be extended to include the underscore:

$searchEmail = "([\p{L}\p{N}\.\'\-\+]+\@(?:[\.\-\p{L}\p{N}]+\.)+(?:[\-\p{L}\p{N}]{2,24}))";

avatar ChristineWk ChristineWk - open - 9 Mar 2025
avatar ChristineWk ChristineWk - change - 9 Mar 2025
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 Mar 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Mar 2025
avatar chiragjethva03
chiragjethva03 - comment - 9 Mar 2025

Hello @ChristineWk

I've gone through the steps to verify this issue. Here's what I did:

  • Enabled the Content - Email Cloaking plugin from the Plugins section to make sure it's active. (Check the attached screenshot 1.)
  • Created a new article in Joomla and included an email address in the content. (Check the attached screenshot 2.)
  • Published the article and viewed it on the frontend to see if the email was obfuscated.

From what I can see, the email is still visible in plain text, meaning cloaking doesn't seem to be working as expected. Just wanted to confirm—am I on the right track, or did I misunderstand something about the issue?

Let me know what you think. Thanks!

Image
Image

avatar ChristineWk
ChristineWk - comment - 9 Mar 2025

@chiragjethva03 - Thanks for your testing!
I'm a little confused now. :-)

You can normally see the email address in the frontend.

A user in the German forum describes the following:
Sample email: max_example@example.com
The system then removes "max" - as the pattern string underscore is not included (see above link).

If the user turns off email obfuscation, the above sample email is accepted.
And that is of course not correct.

avatar chmst
chmst - comment - 9 Mar 2025

confirmed.

@chiragjethva03 check the sourcecode of the article in frontend.

avatar chmst chmst - change - 9 Mar 2025
Labels Added: bug
avatar chmst chmst - labeled - 9 Mar 2025
avatar chmst chmst - change - 9 Mar 2025
Title
E-mail address with an underscore
[5.2] E-mail address with an underscore
avatar chmst chmst - edited - 9 Mar 2025
avatar chiragjethva03
chiragjethva03 - comment - 9 Mar 2025

@ChristineWk
Yes, you're absolutely right! I conducted testing using two different approaches to verify this behavior:

  • With Email Cloaking Enabled – When the plugin is active, Joomla removes the part before the underscore (_), transforming max_example@example.com into example@example.com. Additionally, the remaining email becomes a clickable mailto link.

  • With Email Cloaking Disabled – In this case, the email remains unchanged and displays exactly as written, but it is treated as plain text rather than a clickable email link.

This confirms that the underscore ( _ ) is not properly handled in the email obfuscation logic, leading to unintended modifications. I have attached both test cases as screenshots for reference.

Image
Email Clocking Disable.

Image
Email Cloaking Enabled.

avatar chmst chmst - change - 9 Mar 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-03-09 19:31:27
Closed_By chmst
avatar chmst chmst - close - 9 Mar 2025
avatar chmst
chmst - comment - 9 Mar 2025

Closing as we have PR. Please test #45102

Add a Comment

Login with GitHub to post a comment