"uri" => object.data["id"],
"user" => UserView.render("show.json", %{user: user, for: opts[:for]}),
"statusnet_html" => html,
- "text" => text,
+ "text" => HtmlEntities.decode(text),
"is_local" => activity.local,
"is_post_verb" => true,
"created_at" => created_at,
assert length(result["attachments"]) == 1
assert result["summary"] == "Friday Night"
end
+
+ test "special characters are not escaped in text field for status created" do
+ text = "<3 is on the way"
+
+ {:ok, activity} = CommonAPI.post(insert(:user), %{"status" => text})
+
+ result = ActivityView.render("activity.json", activity: activity)
+
+ assert result["text"] == text
+ end
end