dungyi / wsdl2objc

Automatically exported from code.google.com/p/wsdl2objc
MIT License
0 stars 0 forks source link

Entity encoding bug. Extra & substitutions in generated request values. #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's clearly a glaring bug at line 32 of USAdditions.m  in the 
stringByEscapingXML utility function
http://code.google.com/p/wsdl2objc/source/browse/trunk/Templates/WSDL2ObjC%20Sta
ndard%20Additions/USAdditions_M.template#32

If you do the character replacements in this order, with the ampersand 
character swapped over last, then this incorrectly picks up on the earlier 
character replacements.

For example:
The function should convert  '  to become  '
The function actually converts '  to become '

The fix is simply to do the & substitution before any of the others (move 
the last line above the others)

This bug is evident in the values of any generated SOAP request containing 
apostrophes or other such characters

Original issue reported on code.google.com by harry.w...@gmail.com on 5 Apr 2012 at 1:03

GoogleCodeExporter commented 9 years ago
Thanks a lot for this. I have been stuck with this issue for the past 2 days!

Original comment by kaushik...@gmail.com on 18 Jul 2013 at 6:27