mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-05 08:10:30 +00:00
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:
parent
450421b189
commit
2acee80829
2 changed files with 2 additions and 2 deletions
|
|
@ -126,7 +126,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
text = text.replaceAll('{{CLIPBOARD}}', clipboardText);
|
||||
text = text.replaceAll('{{CLIPBOARD}}', clipboardText.replaceAll('\r\n', '\n'));
|
||||
}
|
||||
|
||||
if (text.includes('{{USER_LOCATION}}')) {
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
text = text.replaceAll('{{CLIPBOARD}}', clipboardText);
|
||||
text = text.replaceAll('{{CLIPBOARD}}', clipboardText.replaceAll('\r\n', '\n'));
|
||||
}
|
||||
|
||||
if (text.includes('{{USER_LOCATION}}')) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue