diff options
author | rinpatch <rinpatch@sdf.org> | 2020-02-11 00:29:25 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-02-11 16:17:21 +0300 |
commit | ea1631d7e67e22eb49d608e066ef4a3555bf25f7 (patch) | |
tree | 53e061abc3dfcc6bfa0f3024b443ac372eb7781c /lib/pleroma/web/metadata | |
parent | 58299fcfb4c9f4ed63c2f791b6ebf9920ebb7659 (diff) | |
download | pleroma-ea1631d7e67e22eb49d608e066ef4a3555bf25f7.tar.gz |
Make Floki use fast_html
Diffstat (limited to 'lib/pleroma/web/metadata')
-rw-r--r-- | lib/pleroma/web/metadata/rel_me.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/metadata/rel_me.ex b/lib/pleroma/web/metadata/rel_me.ex index f87fc1973..86dcc1a3b 100644 --- a/lib/pleroma/web/metadata/rel_me.ex +++ b/lib/pleroma/web/metadata/rel_me.ex @@ -8,8 +8,10 @@ defmodule Pleroma.Web.Metadata.Providers.RelMe do @impl Provider def build_tags(%{user: user}) do - (Floki.attribute(user.bio, "link[rel~=me]", "href") ++ - Floki.attribute(user.bio, "a[rel~=me]", "href")) + bio_tree = Floki.parse_fragment!(user.bio) + + (Floki.attribute(bio_tree, "link[rel~=me]", "href") ++ + Floki.attribute(bio_tree, "a[rel~=me]", "href")) |> Enum.map(fn link -> {:link, [rel: "me", href: link], []} end) |