mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
parent
c7291b8117
commit
c2fd8289c3
1 changed files with 1 additions and 4 deletions
|
@ -169,10 +169,7 @@ defmodule Philomena.Tags.Tag do
|
||||||
# with ascii quotes, trim space from end
|
# with ascii quotes, trim space from end
|
||||||
name
|
name
|
||||||
|> String.downcase()
|
|> String.downcase()
|
||||||
|> String.replace(
|
|> String.replace(~r/[[:space:]\x{00a0}\x{1680}\x{180e}\x{2000}-\x{200f}\x{202f}\x{205f}\x{3000}\x{feff}]+/u, " ")
|
||||||
~r/[[:space:]\x{00a0}\x{1680}\x{180e}\x{2000}-\x{200f}\x{202f}\x{205f}\x{3000}\x{feff}]+/u,
|
|
||||||
" "
|
|
||||||
)
|
|
||||||
|> String.replace(~r/[\x{00b4}\x{2018}\x{2019}\x{201a}\x{201b}\x{2032}]/u, "'")
|
|> String.replace(~r/[\x{00b4}\x{2018}\x{2019}\x{201a}\x{201b}\x{2032}]/u, "'")
|
||||||
|> String.replace(~r/[\x{201c}\x{201d}\x{201e}\x{201f}\x{2033}]/u, "\"")
|
|> String.replace(~r/[\x{201c}\x{201d}\x{201e}\x{201f}\x{2033}]/u, "\"")
|
||||||
|> String.trim()
|
|> String.trim()
|
||||||
|
|
Loading…
Reference in a new issue