Downcase tags coming in through the TwAPI.

This commit is contained in:
Roger Braun 2017-06-18 19:04:46 +02:00
commit 6cac8e3c8b
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ defmodule Pleroma.Formatter do
@tag_regex ~r/\#\w+/u
def parse_tags(text) do
Regex.scan(@tag_regex, text)
|> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, tag} end)
|> Enum.map(fn (["#" <> tag = full_tag]) -> {full_tag, String.downcase(tag)} end)
end
def parse_mentions(text) do