fix: normalize Windows CRLF line endings in clipboard text (#20283)

On Windows, clipboard text uses CRLF (\r\n) line endings which can cause newlines to be lost or displayed incorrectly when pasted via the {{CLIPBOARD}} variable.

Fixed by converting CRLF to LF before inserting clipboard text.

Fixes #19370
This commit is contained in:
Classic298 authored and GitHub committed 2025-12-31 02:22:13 -05:00
1 parent 450421b189
commit 2acee80829
2 files changed
+2 -2

No files matched your search

@@ -126,7 +126,7 @@
}
}
text = text.replaceAll('{{CLIPBOARD}}', clipboardText);
text = text.replaceAll('{{CLIPBOARD}}', clipboardText.replaceAll('\r\n', '\n'));
}
if (text.includes('{{USER_LOCATION}}')) {