@@ -86,30 +86,34 @@ public function emailsAreConverted($rawText, $expectedText)
86
86
87
87
public function emailTexts (): array
88
88
{
89
+
90
+ $ htmlEncodedDecryptionString = htmlspecialchars ('javascript:linkTo_UnCryptMailto( \'ithiOtmpbeat-rdb \', -15) ' );
91
+ $ htmlEncodedSecondDecryptionString = htmlspecialchars ('javascript:linkTo_UnCryptMailto( \'uddqpgOtmpbeat-rdb \', -15) ' );
92
+
89
93
return [
90
94
'just some text not to touch ' => [
91
95
' this Is some string with line ' . chr (10 ) . ' breaks, special chärß and leading/trailing space ' ,
92
96
' this Is some string with line ' . chr (10 ) . ' breaks, special chärß and leading/trailing space '
93
97
],
94
98
'single mail link in text ' => [
95
99
96
- 'Email <a href="javascript:linkTo_UnCryptMailto( \' ithiOtmpbeat-rdb \' , -15) ">test (at) example.com</a> '
100
+ 'Email <a href=" ' . $ htmlEncodedDecryptionString . ' ">test (at) example.com</a> '
97
101
],
98
102
'multiple mail links in text ' => [
99
103
'Email <a href="mailto:[email protected] ">[email protected] </a> and afterwards another email <a href="mailto:[email protected] ">[email protected] </a> ' ,
100
- 'Email <a href="javascript:linkTo_UnCryptMailto( \' ithiOtmpbeat-rdb \' , -15) ">test (at) example.com</a> and afterwards another email <a href="javascript:linkTo_UnCryptMailto( \' uddqpgOtmpbeat-rdb \' , -15) ">foobar (at) example.com</a> '
104
+ 'Email <a href=" ' . $ htmlEncodedDecryptionString . ' ">test (at) example.com</a> and afterwards another email <a href=" ' . $ htmlEncodedSecondDecryptionString . ' ">foobar (at) example.com</a> '
101
105
],
102
106
'email address outside of link ' => [
103
107
'Email [email protected] should not be replaced ' ,
104
108
'Email [email protected] should not be replaced '
105
109
],
106
110
'email address with space at the beginning ' => [
107
111
108
- 'Email <a href="javascript:linkTo_UnCryptMailto( \' ithiOtmpbeat-rdb \' , -15) ">test (at) example.com</a> '
112
+ 'Email <a href=" ' . $ htmlEncodedDecryptionString . ' ">test (at) example.com</a> '
109
113
],
110
114
'email address with attributes after href ' => [
111
115
'Email <a href="mailto: [email protected] " itemprop="email">[email protected] </a> ' ,
112
- 'Email <a href="javascript:linkTo_UnCryptMailto( \' ithiOtmpbeat-rdb \' , -15) " itemprop="email">test (at) example.com</a> '
116
+ 'Email <a href=" ' . $ htmlEncodedDecryptionString . ' " itemprop="email">test (at) example.com</a> '
113
117
]
114
118
];
115
119
}
0 commit comments