doedje / jquery.soap

This script uses $.ajax to send a SOAP:Envelope. It can take XML DOM, XML string or JSON as input and the response can be returned as either XML DOM, XML string or JSON too.
352 stars 148 forks source link

Encode attribute values #111

Closed oneton closed 7 years ago

oneton commented 7 years ago

This one is related to #59. Attribute values aren't encoded yet and can lead to invalid XML.

doedje commented 7 years ago

Dear Oneton, Thanx for the PR, will review it asap, hopefully somewhere this week and merge it, do the version bumping stuff, etc, etc.... :D Thanx again!

doedje commented 7 years ago

Just for my understanding, you are making your data with SOAPObject? Because that is problably the only way to get attribute values in that might break the XML. (inserting data as an XML string is still not working... a valid XML string is required there...)

oneton commented 7 years ago

I create a dom XML object (from text). See for an example (and comparison between the previous and current version) this jsFiddle

doedje commented 7 years ago

Thanx for the clear explanation. Yep I totally forgot about that. Well thanx for the fix!

oneton commented 7 years ago

Happy to contribute! :)