User tests: Successful: Unsuccessful:
Fixes a bug with two test cases in the email cloaking plugin and adds a load of extra unit tests
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>
None
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins Unit Tests |
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>
*/
@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>
Labels |
Added:
?
?
|
Deleted last two comments and edited initial PR with test instructions
I have tested this item
Worked fine for me :)
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks.
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:
?
|
Thanks!
Please give details of the 2 test cases to make it easier for testers.