lib/exlibris/primo/web_service/response/base.rb in exlibris-primo-1.1.0 vs lib/exlibris/primo/web_service/response/base.rb in exlibris-primo-1.1.1
- old
+ new
@@ -17,15 +17,14 @@
super
@savon_response = savon_response
@code = savon_response.http.code
@body = savon_response.http.body
@soap_action = soap_action
- # Since there seem to be a problem parsing strings with unescaped
- # ampersands in Nokogiri for java/jruby we need to
- # force ' & ' to ' & '; may have to do with
- # https://github.com/sparklemotion/nokogiri/issues/614
- @raw_xml =
- savon_response.body[response_key][return_key].gsub(' & ', ' & ')
+ # Primo's XML is unescaped trash that Nokogiri chokes on.
+ # Force & to & and avoid double escaping
+ # This is a complete HACK.
+ @raw_xml = savon_response.body[response_key][return_key].
+ gsub('&', '&').gsub('&', '&')
end
end
end
end
end
\ No newline at end of file