mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Merge pull request #3853 from dandv/patch-2
Handle usernames with consecutive spaces
This commit is contained in:
commit
03f9668d60
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ class ImportScripts::MyBB < ImportScripts::Base
|
|||
# Discourse usernames don't allow spaces
|
||||
def convert_username(username, post_id)
|
||||
count = 0
|
||||
username.gsub!(' ') { |a| count += 1; '_' }
|
||||
username.gsub!(/\s+/) { |a| count += 1; '_' }
|
||||
# Warn on MyBB bug that places post text in the quote line - http://community.mybb.com/thread-180526.html
|
||||
if count > 5
|
||||
puts "Warning: probably incorrect quote in post #{post_id}"
|
||||
|
|
Loading…
Reference in a new issue