Änderungen https Andy Müller rückgängig gemacht

This commit is contained in:
schwaral
2023-04-26 13:53:28 +02:00
parent aa11420ec4
commit e4b5f82858
508 changed files with 2763 additions and 2763 deletions

View File

@ -46,7 +46,7 @@ class HTMLPurifier_Strategy_MakeWellFormed_InjectorTest extends HTMLPurifier_Str
{
$this->config->set('HTML.Allowed', 'a,p');
$this->expectError('Cannot enable Linkify injector because a.href is not allowed');
$this->assertResult('<p>https://example.com</p>');
$this->assertResult('<p>http://example.com</p>');
}
public function testOnlyAutoParagraph()
@ -60,62 +60,62 @@ class HTMLPurifier_Strategy_MakeWellFormed_InjectorTest extends HTMLPurifier_Str
public function testParagraphWrappingOnlyLink()
{
$this->assertResult(
'https://example.com',
'<p><a href="https://example.com">https://example.com</a></p>'
'http://example.com',
'<p><a href="http://example.com">http://example.com</a></p>'
);
}
public function testParagraphWrappingNodeContainingLink()
{
$this->assertResult(
'<b>https://example.com</b>',
'<p><b><a href="https://example.com">https://example.com</a></b></p>'
'<b>http://example.com</b>',
'<p><b><a href="http://example.com">http://example.com</a></b></p>'
);
}
public function testParagraphWrappingPoorlyFormedNodeContainingLink()
{
$this->assertResult(
'<b>https://example.com',
'<p><b><a href="https://example.com">https://example.com</a></b></p>'
'<b>http://example.com',
'<p><b><a href="http://example.com">http://example.com</a></b></p>'
);
}
public function testTwoParagraphsContainingOnlyOneLink()
{
$this->assertResult(
"https://example.com\n\nhttps://dev.example.com",
'<p><a href="https://example.com">https://example.com</a></p>
"http://example.com\n\nhttp://dev.example.com",
'<p><a href="http://example.com">http://example.com</a></p>
<p><a href="https://dev.example.com">https://dev.example.com</a></p>'
<p><a href="http://dev.example.com">http://dev.example.com</a></p>'
);
}
public function testParagraphNextToDivWithLinks()
{
$this->assertResult(
'https://example.com <div>https://example.com</div>',
'<p><a href="https://example.com">https://example.com</a> </p>
'http://example.com <div>http://example.com</div>',
'<p><a href="http://example.com">http://example.com</a> </p>
<div><a href="https://example.com">https://example.com</a></div>'
<div><a href="http://example.com">http://example.com</a></div>'
);
}
public function testRealisticLinkInSentence()
{
$this->assertResult(
'This URL https://example.com is what you need',
'<p>This URL <a href="https://example.com">https://example.com</a> is what you need</p>'
'This URL http://example.com is what you need',
'<p>This URL <a href="http://example.com">http://example.com</a> is what you need</p>'
);
}
public function testParagraphAfterLinkifiedURL()
{
$this->assertResult(
"https://google.com
"http://google.com
<b>b</b>",
"<p><a href=\"https://google.com\">https://google.com</a></p>
"<p><a href=\"http://google.com\">http://google.com</a></p>
<p><b>b</b></p>"
);