From: lain Date: Sat, 31 Mar 2018 19:00:23 +0000 (+0200) Subject: Proper info. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9f45e33ae8ccfdb971caa2fcdb55cffff4e9cc0b;p=akkoma Proper info. --- diff --git a/lib/pleroma/gopher/server.ex b/lib/pleroma/gopher/server.ex index 6a72e8dd0..f72a0a472 100644 --- a/lib/pleroma/gopher/server.ex +++ b/lib/pleroma/gopher/server.ex @@ -50,8 +50,13 @@ defmodule Pleroma.Gopher.Server.ProtocolHandler do end def info(text) do - text = String.replace(text, ~r/[\t\r\n]/, " ") - "#{text}\tfake\(NULL)\t0\r\n" + text = String.replace(text, ~r/[\t\n]/, " ") + String.split(text, "\r") + |> Enum.map(fn (text) -> + "i#{text}\tfake\(NULL)\t0\r\n" + |> IO.inspect() + end) + |> Enum.join("") end def link(name, selector, type \\ 1) do