mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix(lib): include headers from OC\Template\Template as well in produced HTML
Otherwise we only take those added through deprecated method C_Util::addHeader, not those of OC\Template\Template::addHeader, which does nothing Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
1829269f9d
commit
8482302e42
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ class Template extends Base implements ITemplate {
|
|||
|
||||
// Add custom headers
|
||||
$headers = '';
|
||||
foreach (\OC_Util::$headers as $header) {
|
||||
foreach (array_merge(\OC_Util::$headers, $this->headers) as $header) {
|
||||
$headers .= '<' . Util::sanitizeHTML($header['tag']);
|
||||
if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) {
|
||||
$headers .= ' defer';
|
||||
|
|
|
|||
Loading…
Reference in a new issue