diff options
author | Noam Postavsky <npostavs@gmail.com> | 2017-02-11 19:47:55 -0500 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2017-06-29 19:40:23 -0400 |
commit | c87c87fcc361494815bbd1d92f450b0b80a3ecbb (patch) | |
tree | 60d7ae515b92944d1e90772df3ae5dac05b5c715 /lisp/term/w32-win.el | |
parent | 0ae28c71c739dfecbe94a5ff6786e81021d2d1cf (diff) | |
download | emacs-c87c87fcc361494815bbd1d92f450b0b80a3ecbb.tar.gz |
Escape NUL bytes in X selections (Bug#6991)
* lisp/term/w32-win.el (w32--set-selection):
* lisp/select.el (xselect--encode-string): Replace NUL bytes with
"\0".
* doc/emacs/killing.texi: Document new behavior.
* etc/NEWS (times): Announce it.
Diffstat (limited to 'lisp/term/w32-win.el')
-rw-r--r-- | lisp/term/w32-win.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index fda93884c40..be895a040da 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -396,7 +396,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") ;;; Fix interface to (X-specific) mouse.el (defun w32--set-selection (type value) (if (eq type 'CLIPBOARD) - (w32-set-clipboard-data value) + (w32-set-clipboard-data (replace-regexp-in-string "\0" "\\0" value t t)) (put 'x-selections (or type 'PRIMARY) value))) (defun w32--get-selection (&optional type data-type) |