When sending input from a multiline textbox with an xhttp request through javascript, chrome blocks out new lines as part of some new exploit prevention. I have tried using encodeURI, which did nothing, and trying to send
also causes this error. I am allowing users to submit html through the textbox.
Edit:
Javascript code:
var taskid = 'task=' + notes;
var cont = '&content=' + po.value;
var head = '&head=' + pp.value;
var comb = taskid+cont+head;
var nlink = 'create.note.php?'+comb;
var encoded = encodeURI(nlink);
xhttp.open('GET', encoded + comb, true);
Chromes response:
[Deprecation] Resource requests whose URLs contained both removed whitespace
(`\n`, `\r`, `\t`) characters and less-than characters (`<`) are blocked.
Please remove newlines and encode less-than characters from places like
element attribute values in order to load these resources. See
https://www.chromestatus.com/feature/5735596811091968 for more details.
– Jacob Jun 26 '18 at 03:51