summaryrefslogtreecommitdiff
path: root/test/web/twitter_api/twitter_api_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-04-08 22:58:31 +0300
committerrinpatch <rinpatch@sdf.org>2020-04-08 22:58:31 +0300
commitd067eaa7b3bb76e7fc5ae019d6e00510b657171d (patch)
tree1e70580489a5561f6a04fee5e0d2662d7653d119 /test/web/twitter_api/twitter_api_test.exs
parentdd4d10b275e76afc029aea642ae3d69b07e33d81 (diff)
downloadpleroma-d067eaa7b3bb76e7fc5ae019d6e00510b657171d.tar.gz
pleroma-d067eaa7b3bb76e7fc5ae019d6e00510b657171d.zip
formatter.ex: Use Phoenix.HTML for mention/hashtag generation
Unlike concatenating strings, this makes sure everything is escaped. Tests had to be changed because Phoenix.HTML runs attributes through Enum.sort before generation for whatever reason.
Diffstat (limited to 'test/web/twitter_api/twitter_api_test.exs')
-rw-r--r--test/web/twitter_api/twitter_api_test.exs2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs
index 92f9aa0f5..f6e13b661 100644
--- a/test/web/twitter_api/twitter_api_test.exs
+++ b/test/web/twitter_api/twitter_api_test.exs
@@ -109,7 +109,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
{:ok, user2} = TwitterAPI.register_user(data2)
expected_text =
- ~s(<span class="h-card"><a data-user="#{user1.id}" class="u-url mention" href="#{
+ ~s(<span class="h-card"><a class="u-url mention" data-user="#{user1.id}" href="#{
user1.ap_id
}" rel="ugc">@<span>john</span></a></span> test)