mirror of
https://github.com/nextcloud/server.git
synced 2025-12-18 15:56:14 -05:00
Merge pull request #57133 from nextcloud/fix-template-headers-injection
fix(lib): include headers from OC\Template\Template as well in produced HTML
This commit is contained in:
commit
9b1227749f
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