summaryrefslogtreecommitdiff
path: root/test/formatter_test.exs
diff options
context:
space:
mode:
authorraeno <just.raeno@gmail.com>2018-12-19 22:39:44 +0400
committerraeno <just.raeno@gmail.com>2018-12-19 22:39:44 +0400
commit7fb37804313339f9a2215aea27ece42e8ec31312 (patch)
treeb7438e9ecd2f4f90e171c16bacbe538cb1ef6e4e /test/formatter_test.exs
parenta3003364598b42849e384a216948dad810481f51 (diff)
parentf98ee9402fcafff362ab2446f386214d7a5c41c7 (diff)
downloadpleroma-7fb37804313339f9a2215aea27ece42e8ec31312.tar.gz
pleroma-7fb37804313339f9a2215aea27ece42e8ec31312.zip
Merge branch 'develop' into oembed_provider
Diffstat (limited to 'test/formatter_test.exs')
-rw-r--r--test/formatter_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/formatter_test.exs b/test/formatter_test.exs
index bb318b7d5..6cdfa4167 100644
--- a/test/formatter_test.exs
+++ b/test/formatter_test.exs
@@ -22,6 +22,18 @@ defmodule Pleroma.FormatterTest do
assert expected_text ==
Formatter.add_hashtag_links({[], text}, tags) |> Formatter.finalize()
end
+
+ test "does not turn html characters to tags" do
+ text = "Fact #3: pleroma does what mastodon't"
+
+ expected_text =
+ "Fact <a data-tag='3' href='http://localhost:4001/tag/3' rel='tag'>#3</a>: pleroma does what mastodon't"
+
+ tags = Formatter.parse_tags(text)
+
+ assert expected_text ==
+ Formatter.add_hashtag_links({[], text}, tags) |> Formatter.finalize()
+ end
end
describe ".add_links" do