framework7
framework7 copied to clipboard
There is a bug when I use the POST method to send a request contains an `&` character
Code used to reproduce the bug
$$.ajax({
url: 'http://127.0.0.1:8081?a=test',
type: 'POST',
data: {
password: 'pass&word'
},
success:function(data){
console.log(data);
}
})
Maybe this is the cause of the bug https://github.com/nolimits4web/Framework7/blob/master/src/js/dom7-ajax.js#L161
why _data=_data.split("&") ..... only
var s = "";
if (param.data) {
for (var name in param.data) {
if (param.data.hasOwnProperty(name)) {
s += encodeURIComponent(name) + "=" + encodeURIComponent(param.data[name])+"&";
}
}
}
over
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.