You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/core/test/link.js
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ describe('Link', function() {
23
23
24
24
assert.strictEqual(
25
25
data,
26
-
'<p>set a <a href="http://test.com" target="_blank">selection</a> and then convert it to a link.</p>'
26
+
'<p>set a <a href="http://test.com" rel="noopener noreferrer" target="_blank">selection</a> and then convert it to a link.</p>'
27
27
);
28
28
});
29
29
@@ -46,7 +46,7 @@ describe('Link', function() {
46
46
47
47
assert.strictEqual(
48
48
data,
49
-
'<p>set a <a href="http://test.com" target="_blank">http://test.com</a> and then convert it to a link.</p>'
49
+
'<p>set a <a href="http://test.com" rel="noopener noreferrer" target="_blank">http://test.com</a> and then convert it to a link.</p>'
50
50
);
51
51
});
52
52
@@ -69,7 +69,7 @@ describe('Link', function() {
69
69
70
70
assert.strictEqual(
71
71
data,
72
-
'<p>set a <a href="http://test.com" target="_blank">selection</a> and then convert it to a link.</p>'
72
+
'<p>set a <a href="http://test.com" rel="noopener noreferrer" target="_blank">selection</a> and then convert it to a link.</p>'
73
73
);
74
74
});
75
75
@@ -92,7 +92,7 @@ describe('Link', function() {
92
92
93
93
assert.strictEqual(
94
94
data,
95
-
'<p>set a <a href="//test.com" target="_blank">selection</a> and then convert it to a link.</p>'
95
+
'<p>set a <a href="//test.com" rel="noopener noreferrer" target="_blank">selection</a> and then convert it to a link.</p>'
96
96
);
97
97
});
98
98
@@ -115,7 +115,7 @@ describe('Link', function() {
115
115
116
116
assert.strictEqual(
117
117
data,
118
-
'<p>set a <a href="#bookmark" target="_blank">selection</a> and then convert it to a link.</p>'
118
+
'<p>set a <a href="#bookmark" rel="noopener noreferrer" target="_blank">selection</a> and then convert it to a link.</p>'
119
119
);
120
120
});
121
121
@@ -138,7 +138,7 @@ describe('Link', function() {
138
138
139
139
assert.strictEqual(
140
140
data,
141
-
'<p>set a <a href="mailto:test@example.com" target="_self">selection</a> and then convert it to a link.</p>'
141
+
'<p>set a <a href="mailto:test@example.com" rel="noopener noreferrer" target="_self">selection</a> and then convert it to a link.</p>'
142
142
);
143
143
});
144
144
@@ -161,7 +161,7 @@ describe('Link', function() {
161
161
162
162
assert.strictEqual(
163
163
data,
164
-
'<p>set a <a href="mailto:test@example.com" target="_self">selection</a> and then convert it to a link.</p>'
164
+
'<p>set a <a href="mailto:test@example.com" rel="noopener noreferrer" target="_self">selection</a> and then convert it to a link.</p>'
165
165
);
166
166
});
167
167
@@ -184,7 +184,7 @@ describe('Link', function() {
184
184
185
185
assert.strictEqual(
186
186
data,
187
-
'<p>set a <a href="http://medium.com/@whoever/something-else" target="_blank">selection</a> and then convert it to a link.</p>'
187
+
'<p>set a <a href="http://medium.com/@whoever/something-else" rel="noopener noreferrer" target="_blank">selection</a> and then convert it to a link.</p>'
188
188
);
189
189
});
190
190
@@ -193,7 +193,7 @@ describe('Link', function() {
193
193
194
194
bender.tools.selection.setWithHtml(
195
195
this.nativeEditor,
196
-
'<p>get a link from {<a target="_blank" href="http://test.com">selection</a>}.</p>'
196
+
'<p>get a link from {<a rel="noopener noreferrer" target="_blank" href="http://test.com">selection</a>}.</p>'
197
197
);
198
198
199
199
varlinkEl=link.getFromSelection();
@@ -208,7 +208,7 @@ describe('Link', function() {
208
208
209
209
bender.tools.selection.setWithHtml(
210
210
this.nativeEditor,
211
-
'<p>get a link from <a href="http://test.com" target="_blank">se{lect}ion</a>.</p>'
211
+
'<p>get a link from <a href="http://test.com" rel="noopener noreferrer" target="_blank">se{lect}ion</a>.</p>'
212
212
);
213
213
214
214
varlinkEl=link.getFromSelection();
@@ -236,7 +236,7 @@ describe('Link', function() {
236
236
237
237
bender.tools.selection.setWithHtml(
238
238
this.nativeEditor,
239
-
'<p>remove a link from a {<a href="http://test.com" target="_blank">selection</a>}.</p>'
239
+
'<p>remove a link from a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">selection</a>}.</p>'
240
240
);
241
241
242
242
varlinkEl=link.getFromSelection();
@@ -257,7 +257,7 @@ describe('Link', function() {
257
257
258
258
bender.tools.selection.setWithHtml(
259
259
this.nativeEditor,
260
-
'<p>remove a link from a {<a href="http://test.com" target="_blank">selection</a>}.</p>'
260
+
'<p>remove a link from a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">selection</a>}.</p>'
261
261
);
262
262
263
263
link.remove();
@@ -275,7 +275,7 @@ describe('Link', function() {
275
275
276
276
bender.tools.selection.setWithHtml(
277
277
this.nativeEditor,
278
-
'<p>update the URL of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
278
+
'<p>update the URL of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
279
279
);
280
280
281
281
varlinkEl=link.getFromSelection();
@@ -290,7 +290,7 @@ describe('Link', function() {
290
290
291
291
assert.strictEqual(
292
292
data,
293
-
'<p>update the url of a <a href="http://new.com" target="_blank">link</a>.</p>'
293
+
'<p>update the url of a <a href="http://new.com" rel="noopener noreferrer" target="_blank">link</a>.</p>'
294
294
);
295
295
});
296
296
@@ -299,7 +299,7 @@ describe('Link', function() {
299
299
300
300
bender.tools.selection.setWithHtml(
301
301
this.nativeEditor,
302
-
'<p>update the url of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
302
+
'<p>update the url of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
303
303
);
304
304
305
305
link.update('http://new.com');
@@ -311,7 +311,7 @@ describe('Link', function() {
311
311
312
312
assert.strictEqual(
313
313
data,
314
-
'<p>update the url of a <a href="http://new.com" target="_blank">link</a>.</p>'
314
+
'<p>update the url of a <a href="http://new.com" rel="noopener noreferrer" target="_blank">link</a>.</p>'
315
315
);
316
316
});
317
317
@@ -320,7 +320,7 @@ describe('Link', function() {
320
320
321
321
bender.tools.selection.setWithHtml(
322
322
this.nativeEditor,
323
-
'<p>update the URL of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
323
+
'<p>update the URL of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
324
324
);
325
325
326
326
varlinkEl=link.getFromSelection();
@@ -341,7 +341,7 @@ describe('Link', function() {
341
341
342
342
assert.strictEqual(
343
343
data,
344
-
'<p>update the url of a <a href="http://new.com" target="_self">link</a>.</p>'
344
+
'<p>update the url of a <a href="http://new.com" rel="noopener noreferrer" target="_self">link</a>.</p>'
345
345
);
346
346
});
347
347
@@ -350,7 +350,7 @@ describe('Link', function() {
350
350
351
351
bender.tools.selection.setWithHtml(
352
352
this.nativeEditor,
353
-
'<p>update the URL of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
353
+
'<p>update the URL of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
354
354
);
355
355
356
356
link.update({
@@ -365,7 +365,7 @@ describe('Link', function() {
365
365
366
366
assert.strictEqual(
367
367
data,
368
-
'<p>update the url of a <a href="http://new.com" target="_self">link</a>.</p>'
368
+
'<p>update the url of a <a href="http://new.com" rel="noopener noreferrer" target="_self">link</a>.</p>'
369
369
);
370
370
});
371
371
@@ -430,7 +430,7 @@ describe('Link', function() {
430
430
431
431
bender.tools.selection.setWithHtml(
432
432
this.nativeEditor,
433
-
'<p>update the URL of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
433
+
'<p>update the URL of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
434
434
);
435
435
436
436
varlinkEl=link.getFromSelection();
@@ -445,7 +445,7 @@ describe('Link', function() {
445
445
446
446
assert.strictEqual(
447
447
data,
448
-
'<p>update the url of a <a href="http://new.com" target="_blank">link</a>.</p>'
448
+
'<p>update the url of a <a href="http://new.com" rel="noopener noreferrer" target="_blank">link</a>.</p>'
449
449
);
450
450
});
451
451
@@ -547,7 +547,7 @@ describe('Link', function() {
547
547
548
548
assert.strictEqual(
549
549
data,
550
-
'<p>create the url of a <a href="new.com">selection</a>.</p>'
550
+
'<p>create the url of a <a href="new.com" rel="noopener noreferrer">selection</a>.</p>'
551
551
);
552
552
});
553
553
@@ -558,7 +558,7 @@ describe('Link', function() {
558
558
559
559
bender.tools.selection.setWithHtml(
560
560
this.nativeEditor,
561
-
'<p>update the URL of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
561
+
'<p>update the URL of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
562
562
);
563
563
564
564
varlinkEl=link.getFromSelection();
@@ -573,7 +573,7 @@ describe('Link', function() {
573
573
574
574
assert.strictEqual(
575
575
data,
576
-
'<p>update the url of a <a href="new.com" target="_blank">link</a>.</p>'
576
+
'<p>update the url of a <a href="new.com" rel="noopener noreferrer" target="_blank">link</a>.</p>'
577
577
);
578
578
});
579
579
@@ -584,7 +584,7 @@ describe('Link', function() {
584
584
585
585
bender.tools.selection.setWithHtml(
586
586
this.nativeEditor,
587
-
'<p>update the url of a {<a href="http://test.com" target="_blank">link</a>}.</p>'
587
+
'<p>update the url of a {<a href="http://test.com" rel="noopener noreferrer" target="_blank">link</a>}.</p>'
588
588
);
589
589
590
590
varlinkEl=link.getFromSelection();
@@ -603,7 +603,7 @@ describe('Link', function() {
603
603
604
604
assert.strictEqual(
605
605
data,
606
-
'<p>update the url of a <a href="test.com" target="_blank">link</a>.</p>'
606
+
'<p>update the url of a <a href="test.com" rel="noopener noreferrer" target="_blank">link</a>.</p>'
0 commit comments