diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php index d6d70f31362a2..fba06eb83ca5a 100644 --- a/core/templates/layout.base.php +++ b/core/templates/layout.base.php @@ -18,15 +18,15 @@ + + + + - - - - - diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 1692e4268d474..eefd1e711cb56 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -19,15 +19,15 @@ + + + + - - - - - diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 3cfb88bf423d9..484fa6d3cc940 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -26,15 +26,15 @@ + + + + - - - - - diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index 8535e0188793e..4384df7f6adcf 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -223,6 +223,9 @@ public function fetchPage($additionalParams = null) { $headers = ''; foreach(OC_Util::$headers as $header) { $headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']); + if ( strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes']))) ) { + $headers .= ' defer'; + } foreach($header['attributes'] as $name=>$value) { $headers .= ' '.\OCP\Util::sanitizeHTML($name).'="'.\OCP\Util::sanitizeHTML($value).'"'; }