Skip to content
Snippets Groups Projects
Commit 36fcac34 authored by Vivian Lim's avatar Vivian Lim
Browse files

remembered to run mix format a little too late

parent c4389bef
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -186,7 +186,6 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
content_html =
HtmlSanitizeEx.basic_html(content)
|> Formatter.emojify(object["emoji"])
combined_html =
if !!summary and summary != "" do
......@@ -199,7 +198,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
if !!summary and summary != "" do
HtmlSanitizeEx.strip_tags("#{summary} #{content}")
else
HtmlSanitizeEx.strip_tags(content);
HtmlSanitizeEx.strip_tags(content)
end
%{
......
......@@ -248,12 +248,12 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
else
content_html
end
simple_text =
if !!summary and summary != "" do
HtmlSanitizeEx.strip_tags("#{summary} #{content}")
else
HtmlSanitizeEx.strip_tags(content);
HtmlSanitizeEx.strip_tags(content)
end
%{
......
......@@ -126,9 +126,12 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenterTest do
}
expected_summary = "2hu"
expected_content = "alert('YAY')Some <img height='32px' width='32px' alt='2hu' title='2hu' src='corndog.png' /> content mentioning <a href=\"#{
expected_content =
"alert('YAY')Some <img height='32px' width='32px' alt='2hu' title='2hu' src='corndog.png' /> content mentioning <a href=\"#{
mentioned_user.ap_id
}\">@shp</a>"
expected_html =
"<summary>#{expected_summary}</summary><br /><content>#{expected_content}</content>"
......
......@@ -44,8 +44,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
"statusnet_conversation_id" => convo_id,
"statusnet_html" =>
"Hey <span><a href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
"content" =>
"Hey <span><a href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
"content" => "Hey <span><a href=\"#{other_user.ap_id}\">@<span>shp</span></a></span>!",
"summary" => "",
"tags" => [],
"text" => "Hey @shp!",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment