Do not allow dots on URLs
This commit is contained in:
@@ -12,8 +12,8 @@ class String
|
|||||||
def pretty_url
|
def pretty_url
|
||||||
mb_chars.normalize(:kd)
|
mb_chars.normalize(:kd)
|
||||||
.gsub(/[^\x00-\x7F]/n, '')
|
.gsub(/[^\x00-\x7F]/n, '')
|
||||||
.gsub(/[^a-z._0-9 -]/i, "")
|
.gsub(/[^a-z_0-9 -]/i, '')
|
||||||
.gsub(/ +/, "_")
|
.gsub(/ +/, '_')
|
||||||
.downcase.to_s
|
.downcase.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user