Compare commits
1 Commits
feature/sa
...
fix/dont-e
Author | SHA1 | Date | |
---|---|---|---|
|
effcc52ffd |
@ -34,10 +34,12 @@ defmodule Pleroma.Formatter do
|
||||
ap_id = get_ap_id(user)
|
||||
nickname_text = get_nickname_text(nickname, opts)
|
||||
|
||||
rel = if user.local, do: "ugc", else: "ugc canonical"
|
||||
|
||||
link =
|
||||
~s(<span class="h-card"><a data-user="#{id}" class="u-url mention" href="#{ap_id}" rel="ugc">@<span>#{
|
||||
nickname_text
|
||||
}</span></a></span>)
|
||||
~s(<span class="h-card"><a data-user="#{id}" class="u-url mention" href="#{ap_id}" rel="#{
|
||||
rel
|
||||
}">@<span>#{nickname_text}</span></a></span>)
|
||||
|
||||
{link, %{acc | mentions: MapSet.put(acc.mentions, {"@" <> nickname, user})}}
|
||||
|
||||
|
@ -26,7 +26,8 @@ defmodule Pleroma.HTML.Scrubber.Default do
|
||||
"nofollow",
|
||||
"noopener",
|
||||
"noreferrer",
|
||||
"ugc"
|
||||
"ugc",
|
||||
"ugc canonical"
|
||||
])
|
||||
|
||||
Meta.allow_tag_with_these_attributes(:a, ["name", "title"])
|
||||
|
@ -19,7 +19,8 @@ defmodule Pleroma.HTML.Scrubber.LinksOnly do
|
||||
"noopener",
|
||||
"noreferrer",
|
||||
"me",
|
||||
"ugc"
|
||||
"ugc",
|
||||
"ugc canonical"
|
||||
])
|
||||
|
||||
Meta.allow_tag_with_these_attributes(:a, ["name", "title"])
|
||||
|
@ -26,7 +26,9 @@ defmodule Pleroma.HTML.Scrubber.TwitterText do
|
||||
"tag",
|
||||
"nofollow",
|
||||
"noopener",
|
||||
"noreferrer"
|
||||
"noreferrer",
|
||||
"ugc",
|
||||
"ugc canonical"
|
||||
])
|
||||
|
||||
Meta.allow_tag_with_these_attributes(:a, ["name", "title"])
|
||||
|
@ -173,7 +173,7 @@ defmodule Pleroma.FormatterTest do
|
||||
expected_text =
|
||||
~s(<span class="h-card"><a data-user="#{mike.id}" class="u-url mention" href="#{
|
||||
mike.ap_id
|
||||
}" rel="ugc">@<span>mike</span></a></span> test)
|
||||
}" rel="ugc canonical">@<span>mike</span></a></span> test)
|
||||
|
||||
assert expected_text == text
|
||||
end
|
||||
|
@ -1411,7 +1411,7 @@ defmodule Pleroma.UserTest do
|
||||
expected_text =
|
||||
~s(A.k.a. <span class="h-card"><a data-user="#{remote_user.id}" class="u-url mention" href="#{
|
||||
remote_user.ap_id
|
||||
}" rel="ugc">@<span>nick@domain.com</span></a></span>)
|
||||
}" rel="ugc canonical">@<span>nick@domain.com</span></a></span>)
|
||||
|
||||
assert expected_text == User.parse_bio(bio, user)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user