铬不';t发送换行符xhttp/javascript

铬不';t发送换行符xhttp/javascript,javascript,Javascript,当通过javascript从带有xhttp请求的多行文本框发送输入时,chrome会屏蔽新行,作为新的漏洞防范措施的一部分。我尝试过使用encodeURI,但它没有做任何操作,尝试发送也会导致此错误。我允许用户通过文本框提交html 编辑: Javascript代码: var taskid = 'task=' + notes; var cont = '&content=' + po.value; var head = '&head=' + pp.value; var comb =

当通过javascript从带有xhttp请求的多行文本框发送输入时,chrome会屏蔽新行,作为新的漏洞防范措施的一部分。我尝试过使用encodeURI,但它没有做任何操作,尝试发送
也会导致此错误。我允许用户通过文本框提交html

编辑:

Javascript代码:

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);
色度响应:

[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.
[Deprecation]其URL同时包含已删除空格的资源请求

(`\n`、`\r`、`\t`)个字符,少于个字符(`你能分享一些代码吗?这不是普遍的情况。你不能在url中放换行符……你需要发布一个请求,将表单内容放在请求正文中。使用POST解决了这个问题。很公平,我想这太模糊了:你应该在POST请求正文中发送值,而不是url。如何发送使用
XMLHttpRequest
发出POST请求:在发送用户输入(可能包含未知字符)时使用POST,POST比GET更可靠和安全。因此,根据经验,您可能永远不应该使用GET请求发送用户输入