Force utf-8 encoding when processing XML
This commit is contained in:
parent
50d3083cbd
commit
7ce4670164
4 changed files with 10 additions and 3 deletions
|
@ -9,7 +9,9 @@ class FetchRemoteAccountService < BaseService
|
|||
private
|
||||
|
||||
def process_atom(url, body)
|
||||
xml = Nokogiri::XML(body)
|
||||
xml = Nokogiri::XML(body)
|
||||
xml.encoding = 'utf-8'
|
||||
|
||||
url_parts = Addressable::URI.parse(url)
|
||||
username = xml.at_xpath('//xmlns:author/xmlns:name').try(:content)
|
||||
domain = url_parts.host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue