aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-05 02:03:44 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-05 02:13:22 +0100
commit788a354ce0cbe91d0430ce48db62cb537e845a6d (patch)
treee8c802ddf1d95420dafb13911aa20a91c2b1b47f /lib
parent682cc94db11404ad658f566634c1e641cc575091 (diff)
downloadpleroma-788a354ce0cbe91d0430ce48db62cb537e845a6d.tar.gz
Web.RelMe: Fix having other values in rel attr
One example of this is Github which puts a rel="nofollow me" on the profile link.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/rel_me.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/rel_me.ex b/lib/pleroma/web/rel_me.ex
index a07db966f..ab29a36e3 100644
--- a/lib/pleroma/web/rel_me.ex
+++ b/lib/pleroma/web/rel_me.ex
@@ -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