]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Remove content warning processing in put_item_in_cache
[friendica.git] / include / text.php
index 67ce7e65e83df258ae041296b951478453066ca6..f08baaf63fcd884155c586e1508f56e479094187 100644 (file)
@@ -1183,11 +1183,6 @@ function put_item_in_cache(&$item, $update = false)
 {
        $body = $item["body"];
 
-       // Add the content warning
-       if (!empty($item['content-warning'])) {
-               $item["body"] = $item['content-warning'] . '[spoiler]' . $item["body"] . '[/spoiler]';
-       }
-
        $rendered_hash = defaults($item, 'rendered-hash', '');
 
        if ($rendered_hash == ''
@@ -2030,6 +2025,10 @@ function text_highlight($s, $lang) {
                $lang = 'javascript';
        }
 
+       if ($lang === 'bash') {
+               $lang = 'sh';
+       }
+
        // @TODO: Replace Text_Highlighter_Renderer_Html by scrivo/highlight.php
 
        // Autoload the library to make constants available