Skip to content

Commit 87beb1d

Browse files
committed
Fix test as it was intended
1 parent ac16723 commit 87beb1d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/Framework/Text2HtmlTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@ public function test_text2html_xss2()
165165
public function test_text2html_8021()
166166
{
167167
$input = "Test1 [1]\n\n[1] http://d1.tld\n\nyou wrote:\n> Test2 [1]\n>\n> [1] http://d2.tld";
168-
$expected = '<div class="pre">Test1 [<a rel="noreferrer noopener" href="http://d1.tld">1</a>]'
168+
$expected = '<div class="pre">Test1 [<a href="http://d1.tld">1</a>]'
169169
. "<br>\n<br>\n"
170-
. '[1] <a rel="noreferrer noopener" href="http://d1.tld">http://d1.tld</a>'
170+
. '[1] <a href="http://d1.tld">http://d1.tld</a>'
171171
. "<br>\n<br>\n"
172-
. 'you wrote:<blockquote>Test2 [<a rel="noreferrer noopener" href="http://d2.tld">1</a>]'
172+
. 'you wrote:<blockquote>Test2 [<a href="http://d2.tld">1</a>]'
173173
. "<br>\n<br>\n"
174-
. '[1] <a rel="noreferrer noopener" href="http://d2.tld">http://d2.tld</a></blockquote></div>';
174+
. '[1] <a href="http://d2.tld">http://d2.tld</a></blockquote></div>';
175175

176176
$t2h = new \rcube_text2html($input);
177177
$html = $t2h->get_html();
178-
$html = preg_replace('/ (rel|target)="(noreferrer|_blank)"/', '', $html);
178+
$html = preg_replace('/ (rel|target)="(noreferrer noopener|_blank)"/', '', $html);
179179

180180
$this->assertSame($expected, $html);
181181
}

0 commit comments

Comments
 (0)