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
def process_atom(url, body)
Rails.logger.debug "Processing Atom for remote status at #{url}"
- xml = Nokogiri::XML(body)
+ xml = Nokogiri::XML(body)
+ xml.encoding = 'utf-8'
+
account = extract_author(url, xml)
return nil if account.nil?
def call(body, account)
xml = Nokogiri::XML(body)
+ xml.encoding = 'utf-8'
update_author(xml, account)
process_entries(xml, account)
# @param [Account] target_account Account the Salmon was addressed to
def call(envelope, target_account)
body = salmon.unpack(envelope)
- xml = Nokogiri::XML(body)
+
+ xml = Nokogiri::XML(body)
+ xml.encoding = 'utf-8'
return unless contains_author?(xml)