When i post data with ajax json in one line
<p>test</p>
everything is ok, but when i post data in two-line :
<p>test</p>
<p>test</p>
i got error 403
Using FireBug i see this information: for one-line : sastojci=%3Cp%3Efasdfasd%3C%2Fp%3E
for two-line: sastojci=%3Cp%3Efasdfasd%3C%2Fp%3E%0A%3Cp%3Efasdfasd%3C%2Fp%3E
this is code for json: // #sastojci is textarea
$('#update').submit(function(){
$sastojci = $('#sastojci').val();
$.ajax({
type: "POST",
dataType: "json",
data: { sastojci : $sastojci},
url: 'updatedata.php',
success: function(data) {
alert(data.poruka);
},
error: function (data, textStatus, jqXHR) {
alert(data.status);
}
});
return false;
});
This is update for my question:
If i use input insed of textarea, the error is 403 again
If i post:
<p>test</p>p>test</p>
everuthing is ok.
If i post:
<p>test</p><p>test</p>
error is 403 forbiden : You don't have permission to access updatedata.php on this server.
The only diference is "<" ??? I have no idea what is hepening here!!!