Clipboard: handle multiple CR+LF
This commit is contained in:
parent
786aba602f
commit
9a1b1f0d06
|
@ -2356,7 +2356,7 @@ export default class RFB extends EventTargetMixin {
|
|||
textData = textData.slice(0, -1);
|
||||
}
|
||||
|
||||
textData = textData.replace("\r\n", "\n");
|
||||
textData = textData.replaceAll("\r\n", "\n");
|
||||
|
||||
this.dispatchEvent(new CustomEvent(
|
||||
"clipboard",
|
||||
|
|
|
@ -3263,11 +3263,11 @@ describe('Remote Frame Buffer Protocol Client', function () {
|
|||
});
|
||||
|
||||
it('should update clipboard with correct escape characters from a Provide message ', function () {
|
||||
let expectedData = "Oh\nmy!";
|
||||
let expectedData = "Oh\nmy\n!";
|
||||
let data = [3, 0, 0, 0];
|
||||
const flags = [0x10, 0x00, 0x00, 0x01];
|
||||
|
||||
let text = encodeUTF8("Oh\r\nmy!\0");
|
||||
let text = encodeUTF8("Oh\r\nmy\r\n!\0");
|
||||
|
||||
let deflatedText = deflateWithSize(text);
|
||||
|
||||
|
|
Loading…
Reference in New Issue