Merge branch 'bugfix/formatter-single-char-nicks' into 'develop'
formatter: fix single char local nicknames Closes #163 See merge request pleroma/pleroma!290
This commit is contained in:
commit
be7a6db1f5
2 changed files with 30 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ defmodule Pleroma.Formatter do
|
|||
def parse_mentions(text) do
|
||||
# Modified from https://www.w3.org/TR/html5/forms.html#valid-e-mail-address
|
||||
regex =
|
||||
~r/@[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@?[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/u
|
||||
~r/@[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]*@?[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/u
|
||||
|
||||
Regex.scan(regex, text)
|
||||
|> List.flatten()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue