Escape windows newline. (#45771) (#45857)

Fixes #45746

(cherry picked from commit dcd98f7819)

Co-authored-by: Per Osbäck <perosb@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-02-25 12:17:48 +01:00
committed by GitHub
co-authored by Per Osbäck
parent 47c777930d
commit d27bc6e788
+1 -1
View File
@@ -229,4 +229,4 @@ export const checkLogsError = (logRow: LogRowModel): { hasError: boolean; errorM
};
export const escapeUnescapedString = (string: string) =>
string.replace(/\\n|\\t|\\r/g, (match: string) => (match.slice(1) === 't' ? '\t' : '\n'));
string.replace(/\\r\\n|\\n|\\t|\\r/g, (match: string) => (match.slice(1) === 't' ? '\t' : '\n'));