better username extraction

This commit is contained in:
Christian Mehlmauer
2014-07-10 00:24:20 +02:00
parent d5179b742b
commit ceeaeaf487

View File

@@ -68,7 +68,10 @@ class WpUser < WpItem
# &amp; are not decoded with Nokogiri
title_tag.sub!('&amp;', '&')
name = title_tag[%r{([^|«]+) }, 1]
# replace UTF chars like &#187; with dummy character
title_tag.sub!(/&#(\d+);/, '|')
name = title_tag[%r{([^|«»]+) }, 1]
return name.strip if name
end