]> git.mxchange.org Git - friendica.git/commitdiff
Wrap content filter around entire post including attachments
authorHypolite Petovan <mrpetovan@gmail.com>
Wed, 13 Jun 2018 01:54:36 +0000 (21:54 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Wed, 13 Jun 2018 01:54:36 +0000 (21:54 -0400)
include/text.php

index f145c03e5306d7f129cfd710d9e2f58e4b9aa2ee..acc6bec4fbf2d75b4810a840f2ab869789bafe28 100644 (file)
@@ -1280,8 +1280,6 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
        $s = $hook_data['html'];
        unset($hook_data);
 
-       $s = apply_content_filter($s, $filter_reasons);
-
        if (! $attach) {
                // Replace the blockquotes with quotes that are used in mails.
                $mailquote = '<blockquote type="cite" class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">';
@@ -1385,6 +1383,8 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
                $s = preg_replace('|(<img[^>]+src="[^"]+/photo/[0-9a-f]+)-[0-9]|', "$1-" . $ps, $s);
        }
 
+       $s = apply_content_filter($s, $filter_reasons);
+
        $hook_data = ['item' => $item, 'html' => $s];
        Addon::callHooks('prepare_body_final', $hook_data);