Changed to support \r\n and \n
This commit is contained in:
parent
52ee91efce
commit
7517155544
|
@ -347,7 +347,7 @@ def empty_array(conn, _params) do
|
||||||
def update_profile(%{assigns: %{user: user}} = conn, params) do
|
def update_profile(%{assigns: %{user: user}} = conn, params) do
|
||||||
params =
|
params =
|
||||||
if bio = params["description"] do
|
if bio = params["description"] do
|
||||||
bio_brs = Regex.replace(~r/\r\n/,bio,"<br>")
|
bio_brs = Regex.replace(~r/\r?\n/,bio,"<br>")
|
||||||
Map.put(params, "bio", bio_brs)
|
Map.put(params, "bio", bio_brs)
|
||||||
else
|
else
|
||||||
params
|
params
|
||||||
|
|
Loading…
Reference in New Issue