fix the status notification with special char
This commit is contained in:
parent
7fcbda702e
commit
963d5774af
2 changed files with 11 additions and 1 deletions
|
@ -289,7 +289,7 @@ def render(
|
|||
"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,
|
||||
|
|
|
@ -371,4 +371,14 @@ test "a peertube video" do
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue