Server geändert

This commit is contained in:
aschwarz
2023-04-25 13:04:04 +02:00
parent 4f3a51daf1
commit 05c446dac4
615 changed files with 2940 additions and 2940 deletions

View File

@ -153,7 +153,7 @@ class HTMLPurifier_URI
$segments_encoder = new HTMLPurifier_PercentEncoder($chars_pchar . '/');
if (!is_null($this->host)) { // this catches $this->host === ''
// path-abempty (hier and relative)
// http://www.example.com/my/path
// https://www.example.com/my/path
// //www.example.com/my/path (looks odd, but works, and
// recognized by most browsers)
// (this set is valid or invalid on a scheme by scheme
@ -164,12 +164,12 @@ class HTMLPurifier_URI
} elseif ($this->path !== '') {
if ($this->path[0] === '/') {
// path-absolute (hier and relative)
// http:/my/path
// https:/my/path
// /my/path
if (strlen($this->path) >= 2 && $this->path[1] === '/') {
// This could happen if both the host gets stripped
// out
// http://my/path
// https://my/path
// //my/path
$this->path = '';
} else {
@ -177,7 +177,7 @@ class HTMLPurifier_URI
}
} elseif (!is_null($this->scheme)) {
// path-rootless (hier)
// http:my/path
// https:my/path
// Short circuit evaluation means we don't need to check nz
$this->path = $segments_encoder->encode($this->path);
} else {
@ -221,8 +221,8 @@ class HTMLPurifier_URI
// reconstruct authority
$authority = null;
// there is a rendering difference between a null authority
// (http:foo-bar) and an empty string authority
// (http:///foo-bar).
// (https:foo-bar) and an empty string authority
// (https:///foo-bar).
if (!is_null($this->host)) {
$authority = '';
if (!is_null($this->userinfo)) {
@ -238,7 +238,7 @@ class HTMLPurifier_URI
// One might wonder about parsing quirks from browsers after
// this reconstruction. Unfortunately, parsing behavior depends
// on what *scheme* was employed (file:///foo is handled *very*
// differently than http:///foo), so unfortunately we have to
// differently than https:///foo), so unfortunately we have to
// defer to the schemes to do the right thing.
$result = '';
if (!is_null($this->scheme)) {