Merge branch 'fix/html-cache-content-collision' into 'develop'
Different caches based on the module. Remove scrubber version since it is not relevant anymore See merge request pleroma/pleroma!628
This commit is contained in:
commit
bf5aaefbb5
3 changed files with 21 additions and 28 deletions
|
|
@ -120,7 +120,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
content =
|
||||
object
|
||||
|> render_content()
|
||||
|> HTML.get_cached_scrubbed_html_for_object(User.html_filter_policy(opts[:for]), activity)
|
||||
|> HTML.get_cached_scrubbed_html_for_object(
|
||||
User.html_filter_policy(opts[:for]),
|
||||
activity,
|
||||
__MODULE__
|
||||
)
|
||||
|
||||
%{
|
||||
id: to_string(activity.id),
|
||||
|
|
|
|||
|
|
@ -245,14 +245,18 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||
|
||||
html =
|
||||
content
|
||||
|> HTML.get_cached_scrubbed_html_for_object(User.html_filter_policy(opts[:for]), activity)
|
||||
|> HTML.get_cached_scrubbed_html_for_object(
|
||||
User.html_filter_policy(opts[:for]),
|
||||
activity,
|
||||
__MODULE__
|
||||
)
|
||||
|> Formatter.emojify(object["emoji"])
|
||||
|
||||
text =
|
||||
if content do
|
||||
content
|
||||
|> String.replace(~r/<br\s?\/?>/, "\n")
|
||||
|> HTML.get_cached_stripped_html_for_object(activity)
|
||||
|> HTML.get_cached_stripped_html_for_object(activity, __MODULE__)
|
||||
end
|
||||
|
||||
reply_parent = Activity.get_in_reply_to_activity(activity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue