mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
[FIX] invalid byte sequence in UTF-8 (#5003)
Invalid encoding fixed prior to empty check
This commit is contained in:
parent
f1eccd113c
commit
7836b064f4
@ -521,8 +521,8 @@ class BulkImport::Base
|
||||
end
|
||||
|
||||
def fix_name(name)
|
||||
name.scrub! if name.valid_encoding? == false
|
||||
return if name.blank?
|
||||
name.scrub!
|
||||
name = ActiveSupport::Inflector.transliterate(name)
|
||||
name.gsub!(/[^\w.-]+/, "_")
|
||||
name.gsub!(/^\W+/, "")
|
||||
|
Loading…
Reference in New Issue
Block a user