X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Ftwitter_api%2Fviews%2Fuser_view.ex;h=25fda1aa80af3cf017f9c9977d10d392af122124;hb=f6b06d2ac817312b36b7fe78704846541a2e9a5f;hp=30cf266bdd17f2ae8cb7abec5459748e0cce6d11;hpb=cee63ad3f725a90fdd1a438520c33377cee8ad81;p=akkoma diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex index 30cf266bd..25fda1aa8 100644 --- a/lib/pleroma/web/twitter_api/views/user_view.ex +++ b/lib/pleroma/web/twitter_api/views/user_view.ex @@ -36,12 +36,10 @@ defmodule Pleroma.Web.TwitterAPI.UserView do {String.trim(name, ":"), url} end) - bio = HtmlSanitizeEx.strip_tags(user.bio) - data = %{ "created_at" => user.inserted_at |> Utils.format_naive_asctime(), - "description" => bio, - "description_html" => bio |> Formatter.emojify(emoji), + "description" => HtmlSanitizeEx.strip_tags(user.bio |> String.replace("
", "\n")), + "description_html" => HtmlSanitizeEx.basic_html(user.bio), "favourites_count" => 0, "followers_count" => user_info[:follower_count], "following" => following, @@ -50,6 +48,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do "friends_count" => user_info[:following_count], "id" => user.id, "name" => user.name, + "name_html" => HtmlSanitizeEx.strip_tags(user.name) |> Formatter.emojify(emoji), "profile_image_url" => image, "profile_image_url_https" => image, "profile_image_url_profile_size" => image, @@ -58,7 +57,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do "delete_others_notice" => !!user.info["is_moderator"] }, "screen_name" => user.nickname, - "screen_name_html" => Formatter.emojify(user.nickname, emoji), "statuses_count" => user_info[:note_count], "statusnet_profile_url" => user.ap_id, "cover_photo" => User.banner_url(user) |> MediaProxy.url(),