? ? ? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
1 Jan 2017

Summary of Changes

Fixes a bug with two test cases in the email cloaking plugin and adds a load of extra unit tests

Testing Instructions

Test email cloaking continues to work. Unit tests pass (note the corrected expected result of unit tests 4)

For something in browser try using <p><a href="mailto:joe@nowhere13.com?subject= A text" class="class 1 class 2"><span style="font-size: 14pt;">Joe_subject_ fontsize13</span></a></p>. But please make sure you are using codemirror or none as the editor and NOT TinyMCE (as tiny swaps the order of the class and href attribute around). You'll see before the patch what gets rendered is

<p><span id="cloak8969bf0d491b7d014d5815b4edc75189"><a href="mailto:joe@nowhere13.com?subject= A text" ?subject="A" text=""> class="class 1 class 2"<span style="font-size: 14pt;">Joe_subject_ fontsize13</span></a></span></p>

(note that the class is rendered on the page and there is the weird subject property instead the a tag and after the patch the following correctly is rendered

<p><span id="cloak3e0b7379f07410f902a5c4b48ed1a893"><a href="mailto:joe@nowhere13.com?subject= A text" class="class 1 class 2"><span style="font-size: 14pt;">Joe_subject_ fontsize13</span></a></span></p>

Documentation Changes Required

None

avatar wilsonge wilsonge - open - 1 Jan 2017
avatar wilsonge wilsonge - change - 1 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jan 2017
Category Front End Plugins Unit Tests
avatar wilsonge wilsonge - change - 1 Jan 2017
The description was changed
avatar wilsonge wilsonge - edited - 1 Jan 2017
avatar infograf768
infograf768 - comment - 2 Jan 2017

Please give details of the 2 test cases to make it easier for testers.

avatar infograf768
infograf768 - comment - 2 Jan 2017

The 2 cases are

/*
		 * Search for derivatives of link code <a href="mailto:email@amail.com?subject= Text"
		 * ><anyspan>email@amail.com</anyspan></a>
		 */

and

/*
		 * Search for derivatives of link code <a href="mailto:email@amail.com?subject= Text">
		 * <anyspan >anytext</anyspan></a>
		 */
avatar infograf768
infograf768 - comment - 2 Jan 2017

@wilsonge
Not sure I get any difference here.
Here is my code in the editor:

<p><a href="mailto:email@amail.com?subject= Text"><strong>email@amail.com</strong></a></p>
<p></p>
<p><a href="mailto:email@amail.com?subject= Text"><strong>anytext</strong></a></p>

With or without the patch I get something like:

<p><span id="cloak9a61f3c883160fe7da703d8d6ca73cd9">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
				document.getElementById('cloak9a61f3c883160fe7da703d8d6ca73cd9').innerHTML = '';
				var prefix = 'ma' + 'il' + 'to';
				var path = 'hr' + 'ef' + '=';
				var addy9a61f3c883160fe7da703d8d6ca73cd9 = 'email' + '@';
				addy9a61f3c883160fe7da703d8d6ca73cd9 = addy9a61f3c883160fe7da703d8d6ca73cd9 + 'amail' + '.' + 'com?subject= Text';
				var addy_text9a61f3c883160fe7da703d8d6ca73cd9 = '<strong>email' + '@' + 'amail' + '.' + 'com</strong>';document.getElementById('cloak9a61f3c883160fe7da703d8d6ca73cd9').innerHTML += '<a ' + path + '\'' + prefix + ':' + addy9a61f3c883160fe7da703d8d6ca73cd9 + '\'?subject= Text>'+addy_text9a61f3c883160fe7da703d8d6ca73cd9+'<\/a>';
		</script></p>
<p></p>
<p><span id="cloakb2198e9b1b6a02bc0615c65e9619354b">This email address is being protected from spambots. You need JavaScript enabled to view it.</span><script type='text/javascript'>
				document.getElementById('cloakb2198e9b1b6a02bc0615c65e9619354b').innerHTML = '';
				var prefix = 'ma' + 'il' + 'to';
				var path = 'hr' + 'ef' + '=';
				var addyb2198e9b1b6a02bc0615c65e9619354b = 'email' + '@';
				addyb2198e9b1b6a02bc0615c65e9619354b = addyb2198e9b1b6a02bc0615c65e9619354b + 'amail' + '.' + 'com?subject= Text';
				var addy_textb2198e9b1b6a02bc0615c65e9619354b = '<strong>anytext</strong>';document.getElementById('cloakb2198e9b1b6a02bc0615c65e9619354b').innerHTML += '<a ' + path + '\'' + prefix + ':' + addyb2198e9b1b6a02bc0615c65e9619354b + '\'?subject= Text>'+addy_textb2198e9b1b6a02bc0615c65e9619354b+'<\/a>';
		</script></p>

and view is:
screen shot 2017-01-02 at 10 56 39

avatar wilsonge wilsonge - change - 7 Jan 2017
Labels Added: ? ?
avatar wilsonge wilsonge - change - 9 Jan 2017
The description was changed
avatar wilsonge wilsonge - edited - 9 Jan 2017
avatar wilsonge
wilsonge - comment - 9 Jan 2017

Deleted last two comments and edited initial PR with test instructions

avatar cpfeifer
cpfeifer - comment - 9 Jan 2017

I have tested this item successfully on 543614c

Worked fine for me :)


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

avatar cpfeifer cpfeifer - test_item - 9 Jan 2017 - Tested successfully
avatar cpfeifer
cpfeifer - comment - 9 Jan 2017

Here's my output, just FYI
email-cloak-test

avatar infograf768
infograf768 - comment - 13 Jan 2017

I have tested this item successfully on 543614c


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

avatar infograf768 infograf768 - test_item - 13 Jan 2017 - Tested successfully
avatar infograf768 infograf768 - change - 13 Jan 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 13 Jan 2017

RTC. Thanks.


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

avatar rdeutz rdeutz - change - 13 Jan 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-01-13 19:27:30
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 13 Jan 2017
avatar rdeutz rdeutz - merge - 13 Jan 2017
avatar wilsonge
wilsonge - comment - 13 Jan 2017

Thanks!

Add a Comment

Login with GitHub to post a comment