Server geändert

This commit is contained in:
aschwarz
2023-04-25 13:13:40 +02:00
parent 4236ab626b
commit 3232b9ac9c
609 changed files with 2975 additions and 2975 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>http://example.com</p>');
$this->assertResult('<p>https://example.com</p>');
}
public function testOnlyAutoParagraph()
@ -60,62 +60,62 @@ class HTMLPurifier_Strategy_MakeWellFormed_InjectorTest extends HTMLPurifier_Str
public function testParagraphWrappingOnlyLink()
{
$this->assertResult(
'http://example.com',
'<p><a href="http://example.com">http://example.com</a></p>'
'https://example.com',
'<p><a href="https://example.com">https://example.com</a></p>'
);
}
public function testParagraphWrappingNodeContainingLink()
{
$this->assertResult(
'<b>http://example.com</b>',
'<p><b><a href="http://example.com">http://example.com</a></b></p>'
'<b>https://example.com</b>',
'<p><b><a href="https://example.com">https://example.com</a></b></p>'
);
}
public function testParagraphWrappingPoorlyFormedNodeContainingLink()
{
$this->assertResult(
'<b>http://example.com',
'<p><b><a href="http://example.com">http://example.com</a></b></p>'
'<b>https://example.com',
'<p><b><a href="https://example.com">https://example.com</a></b></p>'
);
}
public function testTwoParagraphsContainingOnlyOneLink()
{
$this->assertResult(
"http://example.com\n\nhttp://dev.example.com",
'<p><a href="http://example.com">http://example.com</a></p>
"https://example.com\n\nhttps://dev.example.com",
'<p><a href="https://example.com">https://example.com</a></p>
<p><a href="http://dev.example.com">http://dev.example.com</a></p>'
<p><a href="https://dev.example.com">https://dev.example.com</a></p>'
);
}
public function testParagraphNextToDivWithLinks()
{
$this->assertResult(
'http://example.com <div>http://example.com</div>',
'<p><a href="http://example.com">http://example.com</a> </p>
'https://example.com <div>https://example.com</div>',
'<p><a href="https://example.com">https://example.com</a> </p>
<div><a href="http://example.com">http://example.com</a></div>'
<div><a href="https://example.com">https://example.com</a></div>'
);
}
public function testRealisticLinkInSentence()
{
$this->assertResult(
'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>'
'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>'
);
}
public function testParagraphAfterLinkifiedURL()
{
$this->assertResult(
"http://google.com
"https://google.com
<b>b</b>",
"<p><a href=\"http://google.com\">http://google.com</a></p>
"<p><a href=\"https://google.com\">https://google.com</a></p>
<p><b>b</b></p>"
);

View File

@ -71,7 +71,7 @@ class HTMLPurifier_Strategy_ValidateAttributesTest extends
public function testBasicURI()
{
$this->assertResult('<a href="http://www.google.com/">Google</a>');
$this->assertResult('<a href="https://www.google.com/">Google</a>');
}
public function testInvalidURI()