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>
pull/57133/head
Thomas Citharel 2025-12-16 23:01:38 +07:00
parent 1829269f9d
commit 8482302e42
No known key found for this signature in database
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';