Skip to content

Commit

Permalink
#1461: handle unicode in clipboard data
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@15512 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 4, 2017
1 parent fd21624 commit 9bceecc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/html5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,19 +341,19 @@
var pasteboard = $('#pasteboard');
pasteboard.on('paste', function (e) {
var paste_data = (e.originalEvent || e).clipboardData.getData('text/plain');
client.send_clipboard_token(paste_data);
client.send_clipboard_token(unescape(encodeURIComponent(paste_data)));
return false;
});
pasteboard.on('copy', function (e) {
var clipboard_buffer = client.get_clipboard_buffer();
$('#pasteboard').text(clipboard_buffer);
$('#pasteboard').text(decodeURIComponent(escape(clipboard_buffer)));
$('#pasteboard').select();
client.clipboard_pending = false;
return true;
});
pasteboard.on('cut', function (e) {
var clipboard_buffer = client.get_clipboard_buffer();
$('#pasteboard').text(clipboard_buffer);
$('#pasteboard').text(decodeURIComponent(escape(clipboard_buffer)));
$('#pasteboard').select();
client.clipboard_pending = false;
return true;
Expand Down

0 comments on commit 9bceecc

Please sign in to comment.