Error with ampersand in XML in Zoho API

前端 未结 1 1185
北荒
北荒 2021-01-21 13:08

I\'m using the Zoho API to insert leads into the CRM.

Everything is working fine except when one of the fields contains an ampersand, in which case the response from Zoh

1条回答
  •  一向
    一向 (楼主)
    2021-01-21 13:50

    Finally found a solution: strings containing a special characters must be contained in CDATA sections AND those special characters need to be percent encoded.

    So for the example above, this gives:

    
        
            me@example.com
            
        
    
    

    Note that the value Marks%20%26%20Spencer is also OK for the API.

    0 讨论(0)
提交回复
热议问题