Commit e2924962 by Xavier Antoviaque

Merge pull request #3 from mtyaka/dbl-qmark-bug

Specify contentType in ajax POST request.
parents 864d2bc4 dd7c236c
......@@ -85,7 +85,14 @@ function MentoringBlock(runtime, element) {
}
}
var handlerUrl = runtime.handlerUrl(element, 'submit');
$.post(handlerUrl, JSON.stringify(data)).success(handleSubmitResults);
$.ajax(handlerUrl, {
type: 'POST',
// Set contentType to prevent jQuery from modifying the JSON data.
// (see: http://bugs.jquery.com/ticket/8417)
contentType: 'application/json; charset: UTF-8',
data: JSON.stringify(data),
success: handleSubmitResults
});
});
if (submit_dom.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment