Merge pull request #5198 from MrPetovan/bug/5099-content-filter-hide-attachments
Wrap content filter around entire post including attachments
This commit is contained in:
commit
c8aebaa3eb
1 changed files with 2 additions and 2 deletions
|
@ -1280,8 +1280,6 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
|
||||||
$s = $hook_data['html'];
|
$s = $hook_data['html'];
|
||||||
unset($hook_data);
|
unset($hook_data);
|
||||||
|
|
||||||
$s = apply_content_filter($s, $filter_reasons);
|
|
||||||
|
|
||||||
if (! $attach) {
|
if (! $attach) {
|
||||||
// Replace the blockquotes with quotes that are used in mails.
|
// 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;">';
|
$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 = 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];
|
$hook_data = ['item' => $item, 'html' => $s];
|
||||||
Addon::callHooks('prepare_body_final', $hook_data);
|
Addon::callHooks('prepare_body_final', $hook_data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue