projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove caching because it does not affect performance and may be even worse in some...
[akkoma]
/
lib
/
pleroma
/
web
/
metadata
/
opengraph.ex
diff --git
a/lib/pleroma/web/metadata/opengraph.ex
b/lib/pleroma/web/metadata/opengraph.ex
index 33ff075c64bb4c7a1da955227bf1380faeb9c819..b158569748d5559da9833e10201d59728a35f63f 100644
(file)
--- a/
lib/pleroma/web/metadata/opengraph.ex
+++ b/
lib/pleroma/web/metadata/opengraph.ex
@@
-71,7
+71,7
@@
defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
end)
end
end)
end
- defp scrub_html_and_truncate(%{data: %{
"object" => %{
"content" => content}}} = activity) do
+ defp scrub_html_and_truncate(%{data: %{
"object" => %{
"content" => content}}} = activity) do
content
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
content
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
@@
-80,7
+80,7
@@
defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
|> Formatter.truncate()
end
|> Formatter.truncate()
end
- defp scrub_html_and_truncate(content) do
+ defp scrub_html_and_truncate(content)
when is_binary(content)
do
content
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
content
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
@@
-88,6
+88,7
@@
defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
|> HTML.strip_tags()
|> Formatter.truncate()
end
|> HTML.strip_tags()
|> Formatter.truncate()
end
+
defp attachment_url(url) do
MediaProxy.url(url)
end
defp attachment_url(url) do
MediaProxy.url(url)
end