KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i have an input element with & in value: <input type="checkbox" value="Biografie, životopisy, osudy, Domácí rock&pop" /> When i try sending it through an ajax request: $.ajax({ type: "POST", url: "/admin/kategorie/add/link.json", data: "id="+id+"&value="+value+"&type="+type, error: function(){alert('Chyba! Reloadněte prosím stránku.');} }); the post data that actually gets sent is: id: 1 pop: type: e value: Biografie, životopisy, osudy, Domácí rock *Note that all the variables in data are defined and value contains $(thatInputElement).attr('value'). How can I escape the & properly so that post field value would contain Biografie, životopisy, osudy, Domácí rock&pop ?
Tags (comma-separated)
Save Edits
Cancel