1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-29 08:54:28 +00:00

Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
2025-10-16 07:17:00 +08:00
6 changed files with 40 additions and 20 deletions
+1 -5
View File
@@ -436,14 +436,10 @@ const CurlUtils = {
// This ensures we do not try and double escape another ^ if it was placed
// by the previous replace.
.replace(/%(?=[a-zA-Z0-9_])/g, "%^")
// We replace \r and \r\n with \n, this allows to consistently escape all new
// lines in the next replace
.replace(/\r\n?/g, "\n")
// Lastly we replace new lines with ^ and TWO new lines because the first
// new line is there to enact the escape command the second is the character
// to escape (in this case new line).
// The extra " enables escaping new lines with ^ within quotes in cmd.exe.
.replace(/\n/g, '"^\r\n\r\n"')
.replace(/\r?\n|\r/g, "^\n\n")
+ encapsChars
);
}