formatter.ex: Use Phoenix.HTML for mention/hashtag generation
authorrinpatch <rinpatch@sdf.org>
Wed, 8 Apr 2020 19:58:31 +0000 (22:58 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 8 Apr 2020 19:58:31 +0000 (22:58 +0300)
commitd067eaa7b3bb76e7fc5ae019d6e00510b657171d
tree1e70580489a5561f6a04fee5e0d2662d7653d119
parentdd4d10b275e76afc029aea642ae3d69b07e33d81
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.
lib/pleroma/formatter.ex
test/formatter_test.exs
test/user_test.exs
test/web/common_api/common_api_utils_test.exs
test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
test/web/mastodon_api/controllers/notification_controller_test.exs
test/web/twitter_api/twitter_api_test.exs