jquery - WebAPI posting HTML entities cuts off parameters -
i'm posting contents of div server so.
$.ajax({ type:"post", url: self.settings.spellcheckurl, datatype: "json", data: "=" + content, processdata: false, success: function(result) { ... } });
and works expected, when have html entity in content such
find cut off in web api controller.
raw post fiddler
=<div>the <i><u>raaina </u></i>in <i><u>spaaain </u></i><b><u>saatays</u> maaainly a</b>on <u>plaains</u>..</div>
web api controller
what need prevent this?
try encode data before sending ,
var res = encodeuricomponent(uri);
your case
data: "=" + encodeuricomponent(content)
Comments
Post a Comment