class HTTParty::YMXMLParser
Bug Fix for HTML encoded < and > in XML body. In order to parse the HTML encoded documents returned by the YourMembership
API we need to HTML decode the <![CDATA[ tags.
@api private
Public Instance Methods
body()
click to toggle source
@api private @override
# File lib/httparty/ym_xml_parser.rb, line 12 def body decode(@body) end
Private Instance Methods
decode(body)
click to toggle source
@api private
# File lib/httparty/ym_xml_parser.rb, line 19 def decode(body) # <![CDATA[ = <![CDATA[ # ]]> = ]]> if !body.nil? && body.include?('<![CDATA[') body.gsub! '<![CDATA[', '<![CDATA[' body.gsub! ']]>', ']]>' end body end