Merge branch 'bugfix/rel-me_list' into 'develop'

Web.RelMe: Fix having other values in rel attr

See merge request pleroma/pleroma!901
This commit is contained in:
kaniini 2019-03-06 13:20:51 +00:00
commit 07f8c79a69
4 changed files with 29 additions and 1 deletions

View file

@ -28,7 +28,8 @@ defmodule Pleroma.Web.RelMe do
{:ok, %Tesla.Env{body: html}} = Pleroma.HTTP.get(url, [], adapter: @hackney_options)
data =
Floki.attribute(html, "link[rel=me]", "href") ++ Floki.attribute(html, "a[rel=me]", "href")
Floki.attribute(html, "link[rel~=me]", "href") ++
Floki.attribute(html, "a[rel~=me]", "href")
{:ok, data}
rescue