Fix Pleroma.HTML.extract_first_external_url/2

This commit is contained in:
Egor Kislitsyn 2019-11-29 15:49:35 +07:00
commit a98cda7758
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
2 changed files with 12 additions and 0 deletions

View file

@ -91,6 +91,7 @@ defmodule Pleroma.HTML do
Cachex.fetch!(:scrubber_cache, key, fn _key ->
result =
content
|> HtmlEntities.decode()
|> Floki.filter_out("a.mention,a.hashtag,a[rel~=\"tag\"]")
|> Floki.attribute("a", "href")
|> Enum.at(0)