From 579f3cf8e397bb427098f1bf2bdf3cd2cd19152e Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 21 Jan 2021 15:18:33 +0100 Subject: selection: unbreak text/uri-list decoding: we’re not using \r, not \n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before passing the pasted text to the decoder, we now replace \r\n, and \n, with \r. The URI decoder was looking for a \n, which meant we failed to split up the list and instead pasted a single “multi-line” URI. --- selection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'selection.c') diff --git a/selection.c b/selection.c index 4d6bddf4..fa8ef7a5 100644 --- a/selection.c +++ b/selection.c @@ -1254,7 +1254,7 @@ fdm_receive_decoder_uri(struct clipboard_receive *ctx, char *data, size_t size) char *start = ctx->buf.data; char *end = NULL; - while ((end = memchr(start, '\n', ctx->buf.idx - (start - ctx->buf.data))) != NULL) { + while ((end = memchr(start, '\r', ctx->buf.idx - (start - ctx->buf.data))) != NULL) { decode_one_uri(ctx, start, end - start); start = end + 1; } -- cgit v1.3