common api: format hashtags in the same way as we format mentions
authorWilliam Pitcock <nenolod@dereferenced.org>
Wed, 21 Mar 2018 00:51:47 +0000 (00:51 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Mon, 20 Aug 2018 18:39:47 +0000 (18:39 +0000)
lib/pleroma/web/common_api/utils.ex

index 30089f553abbbf1646f6cd6e748bdd0828dfd7c3..eace3c8a1dc300fb157ed013e45c997c3f3353c4 100644 (file)
@@ -109,7 +109,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
       |> Enum.sort_by(fn {tag, _} -> -String.length(tag) end)
 
     Enum.reduce(tags, text, fn {full, tag}, text ->
-      url = "#<a href='#{Pleroma.Web.base_url()}/tag/#{tag}' rel='tag'>#{tag}</a>"
+      url = "<a href='#{Pleroma.Web.base_url}/tag/#{tag}' rel='tag'>##{tag}</a>"
       String.replace(text, full, url)
     end)
   end