object = Object.normalize(activity, fetch: false)
assert object.data["content"] == "<p><b>2hu</b></p>alert('xss')"
- assert object.data["source"] == post
+
+ assert object.data["source"] == %{
+ "mediaType" => "text/html",
+ "content" => post
+ }
end
test "it filters out obviously bad tags when accepting a post as Markdown" do
object = Object.normalize(activity, fetch: false)
assert object.data["content"] == "<p><b>2hu</b></p>"
- assert object.data["source"] == post
+
+ assert object.data["source"] == %{
+ "mediaType" => "text/markdown",
+ "content" => post
+ }
end
test "it does not allow replies to direct messages that are not direct messages themselves" do