add content + modif html

This commit is contained in:
2019-01-30 12:24:08 +01:00
parent 858bff0f81
commit fd2eac3dc4
46 changed files with 454 additions and 205 deletions
@@ -223,7 +223,7 @@ class ImageMedium extends Medium
foreach ($this->alternatives as $ratio => $medium) {
$srcset[] = $medium->url($reset) . ' ' . $medium->get('width') . 'w';
}
$srcset[] = $this->url($reset) . ' ' . $this->get('width') . 'w';
$srcset[] = str_replace(' ', '%20', $this->url($reset)) . ' ' . $this->get('width') . 'w';
return implode(', ', $srcset);
}
+1 -1
View File
@@ -168,7 +168,7 @@ class Page implements PageInterface
unset($process_fields[$field]);
}
}
$text_header = Grav::instance()['twig']->processString(json_encode($process_fields), ['page' => $this]);
$text_header = Grav::instance()['twig']->processString(json_encode($process_fields, JSON_UNESCAPED_UNICODE), ['page' => $this]);
$this->header((object)(json_decode($text_header, true) + $ignored_fields));
}
}
+6
View File
@@ -1140,6 +1140,8 @@ class Uri
$this->scheme = $env['HTTP_X_FORWARDED_PROTO'];
} elseif (isset($env['X-FORWARDED-PROTO'])) {
$this->scheme = $env['X-FORWARDED-PROTO'];
} elseif (isset($env['HTTP_CLOUDFRONT_FORWARDED_PROTO'])) {
$this->scheme = $env['HTTP_CLOUDFRONT_FORWARDED_PROTO'];
} elseif (isset($env['REQUEST_SCHEME'])) {
$this->scheme = $env['REQUEST_SCHEME'];
} else {
@@ -1168,6 +1170,10 @@ class Uri
$this->port = (int)$env['HTTP_X_FORWARDED_PORT'];
} elseif (isset($env['X-FORWARDED-PORT'])) {
$this->port = (int)$env['X-FORWARDED-PORT'];
} elseif (isset($env['HTTP_CLOUDFRONT_FORWARDED_PROTO'])) {
// Since AWS Cloudfront does not provide a forwarded port header,
// we have to build the port using the scheme.
$this->port = $this->port();
} elseif (isset($env['SERVER_PORT'])) {
$this->port = (int)$env['SERVER_PORT'];
} else {