Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2756

Re: Malformed URI literal syntax error in OData service

$
0
0

Hi Bhavik,

 

In my case I was passing user comments (which could include certain special characters like comma, apostrophe etc.) to the entityset while calling the update method in this format:

 

var userComment = <CommentEnteredByUser>;
encodedComment = encodeURIComponent(userComment);
oModel.update("<Entitysetname>(Id='1234', Action='approve',Comment='"+encodedComment +"')", );

 

This way I ensured that before passing the user entered comment to the OData service it was encoded using the encodeURIComponent() function and the resulting encoded value was passed to the service.

 

Regards,

Saurabh


Viewing all articles
Browse latest Browse all 2756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>