? NPM Resource Changed ? Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar LukasHH
LukasHH
8 Dec 2021

Pull Request for Issue #36166 .

Summary of Changes

Changes to the content plugin emailcloak.php

  • Changes in the respective $replacement specifications
  • A change in the last pattern-string

Changes to the file joomla-hidden-mail.js under media/system/js
Reason: When setting the tag "joomla-hidden-mail" the class and style attributes are duplicated. Therefore I have them both removed from the tag.

A change to the core.js file
Here is the function sanitizeHtml. This had prevented that style specifications are not taken over with images. The attribute "style" was added to the allow list.

Testing Instructions

Include any of the following content with an email in an article. Examples are also in the source code of the "emailcloak" plugin

<p><a href="http://mce_host/ourdirectory/email@example.org" class="btn btn-danger" style="border: 2px solid #f00;">email@example.org</a></p>
<p><a href="http://mce_host/ourdirectory/email@example.org" class="btn btn-danger" style="border: 2px solid #f00;">anytext</a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;">email@example.org</a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;"><span class="test" style="text-transform: uppercase;">email@example.org</span></a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;"><span class="test" style="text-transform: uppercase;">anytext</span></a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;">anytext</a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" /></a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" />email@example.org</a></p>
<p><a href="mailto:email@example.org" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" />any text</a></p>
<p><a href="mailto:email@example.org?subject=Text" class="btn btn-danger" style="border: 2px solid #f00;">email@example.org</a></p>
<p><a href="mailto:email@example.org?subject=Text" class="btn btn-danger" style="border: 2px solid #f00;">anytext</a></p>
<p><a href="mailto:email@example.org?subject= Text" class="btn btn-danger" style="border: 2px solid #f00;"><span class="test" style="text-transform: uppercase;">email@example.org</span></a></p>
<p><a href="mailto:email@example.org?subject= Text" class="btn btn-danger" style="border: 2px solid #f00;"><span class="test" style="text-transform: uppercase;">anytext</span></a></p>
<p><a href="mailto:email@example.org?subject=Text" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" /></a></p>
<p><a href="mailto:email@example.org?subject=Text" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" />email@example.org</a></p>
<p><a href="mailto:email@example.org?subject=Text" class="btn btn-danger" style="border: 2px solid #f00;"><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" />any text</a></p>
<p><img src="images/joomla_black.png" alt="" class="img-thumbnail" style="border: 1px solid #00f;" title="email@example.org" /></p>
<p><input type="text" placeholder="email@example.org" /></p>

Actual result BEFORE applying this Pull Request

image
image
image

Expected result AFTER applying this Pull Request

image
image
image
image

Documentation Changes Required

no changes

avatar LukasHH LukasHH - open - 8 Dec 2021
avatar LukasHH LukasHH - change - 8 Dec 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Dec 2021
Category JavaScript Repository NPM Change Front End Plugins
avatar LukasHH LukasHH - change - 8 Dec 2021
Title
Issiu #36166
[4.0] Fix Content - Email Cloaking removes CSS from Link
avatar LukasHH LukasHH - edited - 8 Dec 2021
avatar LukasHH LukasHH - change - 8 Dec 2021
The description was changed
avatar LukasHH LukasHH - edited - 8 Dec 2021
avatar LukasHH LukasHH - change - 8 Dec 2021
Labels Added: ? NPM Resource Changed
avatar chmst chmst - test_item - 9 Dec 2021 - Tested successfully
avatar chmst
chmst - comment - 9 Dec 2021

I have tested this item successfully on 152b089


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar ChristineWk
ChristineWk - comment - 10 Dec 2021

@LukasHH
thanks for your examples.backend: OK.
wanted to test for frontend with prebuilt package. unfortunately can't reach github view (404) for installing prebuilt-package.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar ChristineWk ChristineWk - test_item - 10 Dec 2021 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 10 Dec 2021

I have tested this item successfully on 152b089

OK, with automatic e-mail, I got now the prebuilt package via github.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar richard67 richard67 - change - 10 Dec 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 10 Dec 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar nikzolahr
nikzolahr - comment - 10 Dec 2021

Works for me! Great work, thanks! ?

avatar khu5h1 khu5h1 - test_item - 14 Dec 2021 - Tested successfully
avatar khu5h1
khu5h1 - comment - 14 Dec 2021

I have tested this item successfully on 152b089


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar bembelimen bembelimen - change - 21 Jan 2022
Labels Added: ?
avatar bembelimen bembelimen - change - 25 Jan 2022
Labels Added: ?
Removed: ?
avatar richard67 richard67 - change - 31 Jan 2022
Title
[4.0] Fix Content - Email Cloaking removes CSS from Link
[4.1] Fix Content - Email Cloaking removes CSS from Link
avatar richard67 richard67 - edited - 31 Jan 2022
avatar bembelimen
bembelimen - comment - 17 Mar 2022

For me this solves a lot of problems but the first example is broken. It should NOT display the email address at all, even though there is a link around. The email address has to be "cloaked" there too (without a mailto link)

avatar Quy Quy - change - 18 Mar 2022
Status Ready to Commit Pending
avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 27 Jun 2022
Labels Added: ? ?
Removed: ?
avatar bembelimen
bembelimen - comment - 21 Oct 2022

@LukasHH would you mind looking into this PR and fix the last issue?

avatar LukasHH
LukasHH - comment - 23 Oct 2022

@bembelimen I will see that I can fix the last problem.

avatar LukasHH LukasHH - change - 2 Nov 2022
Labels Added: ? Maintainers Checked
Removed: ? ?
avatar richard67
richard67 - comment - 26 Nov 2022

@chmst @ChristineWk @khu5h1 Could you test again? The PR has received some change due to a review comment. Thanks in advance.

avatar chmst chmst - test_item - 27 Nov 2022 - Tested successfully
avatar chmst
chmst - comment - 27 Nov 2022

I have tested this item successfully on 35f0e39


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar ChristineWk ChristineWk - test_item - 27 Nov 2022 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 27 Nov 2022

I have tested this item successfully on 35f0e39


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar richard67 richard67 - change - 27 Nov 2022
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 27 Nov 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36269.

avatar fancyFranci fancyFranci - change - 29 Nov 2022
Labels Added: ?
Removed: ?
avatar fancyFranci fancyFranci - change - 29 Nov 2022
Title
[4.1] Fix Content - Email Cloaking removes CSS from Link
[4.2] Fix Content - Email Cloaking removes CSS from Link
avatar fancyFranci fancyFranci - change - 29 Nov 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-11-29 21:39:31
Closed_By fancyFranci
avatar fancyFranci fancyFranci - edited - 29 Nov 2022
avatar fancyFranci fancyFranci - close - 29 Nov 2022
avatar fancyFranci fancyFranci - merge - 29 Nov 2022
avatar fancyFranci
fancyFranci - comment - 29 Nov 2022

Thank you very much @LukasHH !

Add a Comment

Login with GitHub to post a comment