I have an issue with an admin page that sends data using JQuery AJAX, but it doesn't handle & or ", and the reason is obvious (they break the data string/url).
What is the correct way to send this data using Javascript that will allow these characters? Using an array of data may solve for & but would it solve for "?
Example input that must be acceptable: Do this & press "enter"
function SaveCombinations() {
var priority = 0;
$("#sort li").each(function() {
$.ajax({"url": "lib/sc-save.php", "data": "id="+this.id+"&name="+$(this).find("input").val()+"&priority="+priority, "type": "POST",
"success": function() {}});
priority++;
});
}