Fixes incorrect detection of the username

This commit is contained in:
erwanlr
2015-08-13 10:27:33 +01:00
parent 1652c09e95
commit cc737090a2
2 changed files with 8 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ class WpUser < WpItem
#
# @return [ String ] The login
def self.login_from_author_pattern(text)
return unless text =~ %r{/author/([^/\b]+)/?}i
return unless text =~ %r{/author/([^/\b"']+)/?}i
Regexp.last_match[1].force_encoding('UTF-8')
end