I have a form with following structure:
<form id="example" class="form" method="post" action="/edu/example/education_document/update">
<div class="education_document">
<div class="form-group">
<label for="education_document_file">Fil</label>
<input class="form-control" id="education_document_file" type="file" value="" name="education_document_file">
</div>
<div class="form-group">
<label for="education_document_name">Namn *</label>
<input class="form-control" id="education_document_name" type="text" value="tese+test" name="education_document_name" required="">
</div>
<div class="form-group">
<label for="education_document_description">Description</label>
<textarea class="form-control" name="education_document_description" placeholder="Description" rows="5"></textarea>
</div>
<div class="btn-container">
<div class="btn-container-inner">
<div class="btn-row">
<div class="pull-right">
<button type="submit" name="save" id="save" value="save" class="btn btn-primary Spara" data-loading-text="Spara">Save/button>
<button type="submit" name="cancel" id="cancel" value="cancel" class="btn btn-default Avbryt" data-loading-text="Avbryt">Cancel</button>
</div>
</div>
</div>
</div>
</form>.
I serialize using form.serialize();. In my ajax call I have made the contentType and processData parameter false based on the following [Stack overflow : For uncaught-type error-illegal invocation].
But nowI have problems in encoding. For example if I give 'space' in input filed I get plus and '&' I get %26. Based on following link I tried serialize [Serialize-convert-space to plus problem][1] [1]: jQuery serialize converts all spaces to plus. But the problem with '&' is still continuing and space to '+' is solved