File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments