mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Code review: safer to split on official line separator
Will still join lines using the detected line separator.
This commit is contained in:
parent
008fc488c1
commit
55d45a6fb1
1 changed files with 1 additions and 1 deletions
|
|
@ -375,7 +375,7 @@ registerScriptlet(trustedJsonEditFetchResponse, {
|
|||
function jsonlEditFn(jsonp, text = '') {
|
||||
const safe = safeSelf();
|
||||
const lineSeparator = /\r?\n/.exec(text)?.[0] || '\n';
|
||||
const linesBefore = text.split(lineSeparator);
|
||||
const linesBefore = text.split('\n');
|
||||
const linesAfter = [];
|
||||
for ( const lineBefore of linesBefore ) {
|
||||
let obj;
|
||||
|
|
|
|||
Loading…
Reference in a new issue