Commit f08d553e authored by Igor Drozdov's avatar Igor Drozdov

Rename deprecated normalize to unicode_normalize

This merge request introduces the following changes:

- uses unicode_normalize instead of the deprecated normalize
- updates babosa gem the new version that fixes the warning
parent 2376a5ee
......@@ -267,7 +267,7 @@ gem 'kubeclient', '~> 4.9.1'
# Sanitize user input
gem 'sanitize', '~> 5.2.1'
gem 'babosa', '~> 1.0.2'
gem 'babosa', '~> 1.0.4'
# Sanitizes SVG input
gem 'loofah', '~> 2.2'
......
......@@ -132,7 +132,7 @@ GEM
faraday_middleware (~> 1.0.0.rc1)
net-http-persistent (~> 4.0)
nokogiri (~> 1.11.0.rc2)
babosa (1.0.2)
babosa (1.0.4)
backport (1.1.2)
base32 (0.3.2)
batch-loader (2.0.1)
......@@ -1378,7 +1378,7 @@ DEPENDENCIES
aws-sdk-cloudformation (~> 1)
aws-sdk-core (~> 3)
aws-sdk-s3 (~> 1)
babosa (~> 1.0.2)
babosa (~> 1.0.4)
base32 (~> 0.3.0)
batch-loader (~> 2.0.1)
bcrypt (~> 3.1, >= 3.1.14)
......
......@@ -81,7 +81,7 @@ module Gitlab
# Get the first part of the email address (before @)
# In addition in removes illegal characters
def generate_username(email)
email.match(/^[^@]*/)[0].mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/, '').to_s
email.match(/^[^@]*/)[0].mb_chars.unicode_normalize(:nfkd).gsub(/[^\x00-\x7F]/, '').to_s
end
def generate_temporarily_email(username)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment