]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/CustomHtmlHeadContentProvider.php
fix(wysiwyg): preserves line feeds in code block mode
[bookstack] / app / Theming / CustomHtmlHeadContentProvider.php
index 6110d5a606672f7fcee6ec103432599ca06760b0..041e5d025bd8ec8ab5e21c8e9fbb883abdce6031 100644 (file)
@@ -33,9 +33,10 @@ class CustomHtmlHeadContentProvider
     {
         $content = $this->getSourceContent();
         $hash = md5($content);
-        $html = $this->cache->remember('custom-head-web:' . $hash, 86400, function() use ($content) {
+        $html = $this->cache->remember('custom-head-web:' . $hash, 86400, function () use ($content) {
             return HtmlNonceApplicator::prepare($content);
         });
+
         return HtmlNonceApplicator::apply($html, $this->cspService->getNonce());
     }
 
@@ -47,8 +48,9 @@ class CustomHtmlHeadContentProvider
     {
         $content = $this->getSourceContent();
         $hash = md5($content);
-        return $this->cache->remember('custom-head-export:' . $hash, 86400, function() use ($content) {
-             return HtmlContentFilter::removeScripts($content);
+
+        return $this->cache->remember('custom-head-export:' . $hash, 86400, function () use ($content) {
+            return HtmlContentFilter::removeScripts($content);
         });
     }
 
@@ -59,5 +61,4 @@ class CustomHtmlHeadContentProvider
     {
         return setting('app-custom-head', '');
     }
-
-}
\ No newline at end of file
+}