? Success

User tests: Successful: Unsuccessful:

avatar Hoffi1
Hoffi1
11 Jan 2016

On international email addresses href must be encoded with punycode, of course, but shown text should be human readable utf-8.

avatar Hoffi1 Hoffi1 - open - 11 Jan 2016
avatar Hoffi1 Hoffi1 - change - 11 Jan 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Jan 2016
Labels Added: ?
avatar Hoffi1 Hoffi1 - change - 11 Jan 2016
Title
Fix #8880: xupport IDN in JHtmlEmail::cloak()
Fix #8880: support IDN in JHtmlEmail::cloak()
avatar brianteeman brianteeman - change - 12 Jan 2016
Category Plugins
avatar infograf768 infograf768 - test_item - 12 Jan 2016 - Tested successfully
avatar infograf768
infograf768 - comment - 12 Jan 2016

I have tested this item :white_check_mark: successfully on c1ce75d

This works OK when displaying mail for example in a contact.

Note, it would be good to also do something when we have an UTF8 email in a content as cloak does not work in that case.

Example:

<p>Mail on IMAGE:</p>
<p><a href="mailto:joomlatest@джумла-тест.рф" rel="alternate"><img src="images/fr.gif" alt="" /></a></p>


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

avatar Hoffi1
Hoffi1 - comment - 12 Jan 2016

@infograf768: Your example should work (the cloaking part) but user/editor have to punycode the hostname in href. I think JHtmlEmail can't help there.

avatar infograf768
infograf768 - comment - 12 Jan 2016

@Hoffi1

Yes, sure, I know that. :smiley:
It works when the punyencoded version is used instead of UTF8.
The problem we have is with the $searchMail in the plugin as it does not look for a possible utf8 email address.
See the regex here:
https://github.com/joomla/joomla-cms/blob/staging/plugins/content/emailcloak/emailcloak.php#L117

avatar Hoffi1
Hoffi1 - comment - 12 Jan 2016

@infograf768: Yes. But I think it's not a problem of the plugin because utf8 address is not valid.
I mean, on an input field this field will return punycoded email address which will be stored in db.
But the editor doesn't encode it before storing the content.
Sure, one can enhance the plugin to detect and convert this. But what if a user deactivates the plugin because (s)he don't want email cloaking (e.g. on an intranet with JS-free browsers or other crazy environments). Then the plugin should get "IDN handling" as new, additional job, clearly described for the site admins, instead of a silent side effect, I think.

avatar anibalsanchez
anibalsanchez - comment - 27 Jan 2016

Testing instructions?


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

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

Testing instructions?

Sorry, it was in corresponding issue:

Let's say we have a Contact with email "lieschen@müller.de" (domain with non-ASCII character(s)) and configured to show it on frontend.
Then we get a link (href) mailto:lieschen@xn--mller-kva.de which is ok, but also text "lieschen@xn--mller-kva.de" shown.
That's because JHtml::_('email.cloak',... is used which doesn't convert text to show back to utf-8.

With this fix user sees "lieschen@müller.de" as expected.

avatar brianteeman
brianteeman - comment - 29 Jan 2016

The problem is that a domain like müller.de http://xn--mller-kva.de will
only display in a browser that supports it (you have to have that language
installed) otherwise it will be displayed as http://xn--mller-kva.de/ which
is exactly what I see in my browser

On 29 January 2016 at 13:18, Hoffi1 notifications@github.com wrote:

Testing instructions?

Sorry, it was in corresponding issue:

Let's say we have a Contact with email "lieschen@müller.de" (domain with
non-ASCII character(s)) and configured to show it on frontend.
Then we get a link (href) mailto:lieschen@xn--mller-kva.de which is ok,
but also text "lieschen@xn--mller-kva.de" shown.
That's because JHtml::_('email.cloak',... is used which doesn't convert
text to show back to utf-8.

With this fix user sees "lieschen@müller.de" as expected.


Reply to this email directly or view it on GitHub
#8881 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

@brianteeman : I talk about the text located between <a> and </a> tag which isn't touched by the browser.
If I type in and later see "...müller.de" in edit view I also expect "...müllet.de" in details view. That has nothings to do with the browser - which is in both cases the same one, btw.

avatar brianteeman
brianteeman - comment - 29 Jan 2016

I tested this by simply typing two email addresses in an article - one with (brian@müller.de) and one without special characters (brian@joomla.com).
Before the patch only the second one was converted to a clickable mailto link with mail cloak protection
After the patch there was no change


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

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

within "normal" content is a slightly different story. Within input fields of type email or url the code handling those fiields will convert data using punycode if required and store domain names as plain ASCII in ounycode form (with "xn--") into database. But the editor doesn't so that the email cloak plugin doesn't detect this as valid email address. Sp my patch can't work because JHtmlEmail::cloak() isn't called by email cloak plugin. That's the second story @infograf768 and I talked about above.

Edit: That means if you type in mailto:brain@xn--mller-kva.de in an article you'll get a cloaked and clickable mailto link in frontend.

avatar brianteeman
brianteeman - comment - 29 Jan 2016

So what am I supposed to be testing


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

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

To test the effect of this fix one should use the Email field of a Contact.

avatar brianteeman
brianteeman - comment - 29 Jan 2016

OK - i entered brian@müller.com as the email for a contact and set the email address to be displayed

Before the patch the punycode version was displayed and the link was the punycode version
After the patch the idn version was displayed and the link was still the punycode version


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

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

Yes, exact this was the intention of that fix. Thanks Brian and sorry for any confusion - sometimes I'm complicated... :wink:

avatar brianteeman
brianteeman - comment - 29 Jan 2016

Personally I wouldnt want to see this merged as it doesnt cover all uses of the IDN email - much better to fix it all in one go - my 2c

avatar Hoffi1
Hoffi1 - comment - 29 Jan 2016

I understand this and I would like a complete solution too. Unfortunately both parts are within completely different pieces of code - one in JHtmlEmail, the other somewhere deep in the TinyMCE. And I'm not the right person for Javascript.

avatar infograf768
infograf768 - comment - 30 Jan 2016

@brianteeman I think we can merge this, even if it only takes care of the display issue of a contact.
As @Hoffi1 says, the other issue is related to the editor(s) and is quite different.

Need your test OK

avatar alikon alikon - test_item - 30 Jan 2016 - Tested successfully
avatar alikon
alikon - comment - 30 Jan 2016

I have tested this item :white_check_mark: successfully on c1ce75d


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

avatar infograf768 infograf768 - change - 30 Jan 2016
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 30 Jan 2016

RTC for 3.5.0


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

avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 30 Jan 2016

@infograf768 ok - but I hope someone will look to address the other issues
with IDN email addresses in the future

On 30 January 2016 at 07:57, infograf768 notifications@github.com wrote:

RTC for 3.5.0

This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/8881
https://issues.joomla.org/tracker/joomla-cms/8881.


Reply to this email directly or view it on GitHub
#8881 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar infograf768
infograf768 - comment - 30 Jan 2016

@brianteeman
I guess we solved already all core Joomla UI issues when this one is merged (I.e. Show the utf8 mail and use the idn code in the mailto: as saved in the database). Concerning the editors contents (not only TinyMCE) it looks quite difficult to do automatically. I will post the issue on TinyMce tracker.

avatar brianteeman
brianteeman - comment - 30 Jan 2016

Is it really a tinymce issue - does the same with no editor

On 30 January 2016 at 10:05, infograf768 notifications@github.com wrote:

@brianteeman https://github.com/brianteeman
I guess we solved already all core Joomla UI issues when this one is
merged (I.e. Show the utf8 mail and use the idn code in the mailto: as
saved in the database). Concerning the editors contents (not only TinyMCE)
it looks quite difficult to do automatically. I will post the issue on
TinyMce tracker.


Reply to this email directly or view it on GitHub
#8881 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar infograf768
infograf768 - comment - 30 Jan 2016

Maybe we could have a solution by adding a method to JFilterInput and run it in filterText()

avatar infograf768
infograf768 - comment - 1 Feb 2016

Folks, thank you for looking at this solution for utf8 mailto mails entered in editors
#9041

avatar Kubik-Rubik
Kubik-Rubik - comment - 2 Feb 2016

@Hoffi1 Thank you!

avatar Kubik-Rubik Kubik-Rubik - change - 2 Feb 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-02-02 08:44:58
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - close - 2 Feb 2016
avatar joomla-cms-bot joomla-cms-bot - close - 2 Feb 2016
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment