diff --git a/include/conversation.php b/include/conversation.php index 6bf511a6bc..fd7303fa46 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -576,7 +576,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o unset($likebuttons['dislike']); } - $body = Item::prepareBody($item, true, $preview); + $body_html = Item::prepareBody($item, true, $preview); list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item); @@ -601,7 +601,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o 'lock' => $lock, 'thumb' => DI::baseUrl()->remove($item['author-avatar']), 'title' => $title, - 'body' => $body, + 'body_html' => $body_html, 'tags' => $tags['tags'], 'hashtags' => $tags['hashtags'], 'mentions' => $tags['mentions'], @@ -612,7 +612,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o 'has_folders' => ((count($folders)) ? 'true' : ''), 'categories' => $categories, 'folders' => $folders, - 'text' => strip_tags($body), + 'text' => strip_tags($body_html), 'localtime' => DateTimeFormat::local($item['created'], 'r'), 'ago' => (($item['app']) ? DI::l10n()->t('%s from %s', Temporal::getRelativeDate($item['created']),$item['app']) : Temporal::getRelativeDate($item['created'])), 'location_html' => $location_html, diff --git a/src/Object/Post.php b/src/Object/Post.php index f5e91c07c5..8176233092 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -357,13 +357,12 @@ class Post localize_item($item); - $body = Item::prepareBody($item, true); + $body_html = Item::prepareBody($item, true); list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item); - $body_e = $body; - $text_e = strip_tags($body); $name_e = $profile_name; + $text = strip_tags($body_html); if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) { $title_e = ucfirst($item['content-warning']); @@ -432,8 +431,8 @@ class Post 'has_folders' => ((count($folders)) ? 'true' : ''), 'categories' => $categories, 'folders' => $folders, - 'body' => $body_e, - 'text' => $text_e, + 'body_html' => $body_html, + 'text' => $text, 'id' => $this->getId(), 'guid' => urlencode($item['guid']), 'isevent' => $isevent, diff --git a/view/templates/search_item.tpl b/view/templates/search_item.tpl index 82db4884c6..32d1823ca5 100644 --- a/view/templates/search_item.tpl +++ b/view/templates/search_item.tpl @@ -30,7 +30,7 @@
{{$item.title}}
-
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
{{if $item.has_cats}}
{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}}{{if $cat.removeurl}} [{{$remove}}]{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
diff --git a/view/templates/wall_thread.tpl b/view/templates/wall_thread.tpl index 13b358b520..c805a2921e 100644 --- a/view/templates/wall_thread.tpl +++ b/view/templates/wall_thread.tpl @@ -58,7 +58,7 @@
{{$item.title}}
-
{{$item.body nofilter}} +
{{$item.body_html nofilter}}
{{if !$item.suppress_tags}} {{foreach $item.tags as $tag}} diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index e48a12b50b..bb01b48ddb 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -96,7 +96,7 @@

{{$item.title}}


{{/if}} -
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 2b285456a9..03a1889e2f 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -246,7 +246,7 @@ as the value of $top_child_total (this is done at the end of this file)

{{$item.title}}


{{/if}} -
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
diff --git a/view/theme/quattro/templates/search_item.tpl b/view/theme/quattro/templates/search_item.tpl index be9a43604a..dcbe827909 100644 --- a/view/theme/quattro/templates/search_item.tpl +++ b/view/theme/quattro/templates/search_item.tpl @@ -23,7 +23,7 @@
{{if $item.title}}

{{$item.title}}

{{/if}} -
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
diff --git a/view/theme/quattro/templates/wall_item_tag.tpl b/view/theme/quattro/templates/wall_item_tag.tpl index e957e719a6..4e0c230cb0 100644 --- a/view/theme/quattro/templates/wall_item_tag.tpl +++ b/view/theme/quattro/templates/wall_item_tag.tpl @@ -37,7 +37,7 @@
{{$item.location_html nofilter}}
- {{$item.ago}} {{$item.body nofilter}} + {{$item.ago}} {{$item.body_html nofilter}}
{{if $item.drop.pagedrop}} diff --git a/view/theme/quattro/templates/wall_thread.tpl b/view/theme/quattro/templates/wall_thread.tpl index 7c8a567835..612e646f04 100644 --- a/view/theme/quattro/templates/wall_thread.tpl +++ b/view/theme/quattro/templates/wall_thread.tpl @@ -54,7 +54,7 @@
{{if $item.title}}

{{$item.title}}

{{/if}} - {{$item.body nofilter}} + {{$item.body_html nofilter}}
diff --git a/view/theme/smoothly/templates/search_item.tpl b/view/theme/smoothly/templates/search_item.tpl index 284264f29b..1e5b5c5801 100644 --- a/view/theme/smoothly/templates/search_item.tpl +++ b/view/theme/smoothly/templates/search_item.tpl @@ -31,7 +31,7 @@
{{$item.title}}
-
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
{{$item.name}} diff --git a/view/theme/smoothly/templates/wall_thread.tpl b/view/theme/smoothly/templates/wall_thread.tpl index 99d7020539..198b785019 100644 --- a/view/theme/smoothly/templates/wall_thread.tpl +++ b/view/theme/smoothly/templates/wall_thread.tpl @@ -62,7 +62,7 @@
{{$item.title}}
-
{{$item.body nofilter}} +
{{$item.body_html nofilter}}
{{if !$item.suppress_tags}} {{foreach $item.tags as $tag}} diff --git a/view/theme/vier/templates/search_item.tpl b/view/theme/vier/templates/search_item.tpl index 1ab47844cc..b21b3de9fd 100644 --- a/view/theme/vier/templates/search_item.tpl +++ b/view/theme/vier/templates/search_item.tpl @@ -30,7 +30,7 @@
{{if $item.title}}

{{$item.title}}

{{/if}} -
{{$item.body nofilter}}
+
{{$item.body_html nofilter}}
diff --git a/view/theme/vier/templates/wall_item_tag.tpl b/view/theme/vier/templates/wall_item_tag.tpl index eedc51bf17..f52da7c8d5 100644 --- a/view/theme/vier/templates/wall_item_tag.tpl +++ b/view/theme/vier/templates/wall_item_tag.tpl @@ -37,7 +37,7 @@
{{$item.location_html nofilter}}
- {{$item.ago}} {{$item.body nofilter}} + {{$item.ago}} {{$item.body_html nofilter}}
{{if $item.drop.pagedrop}} diff --git a/view/theme/vier/templates/wall_thread.tpl b/view/theme/vier/templates/wall_thread.tpl index 60f0c796cb..29d6840c7a 100644 --- a/view/theme/vier/templates/wall_thread.tpl +++ b/view/theme/vier/templates/wall_thread.tpl @@ -74,7 +74,7 @@
{{if $item.title}}

{{$item.title}}

{{/if}} - {{$item.body nofilter}} + {{$item.body_html nofilter}}