#371 oob_response: avoid extra newlines in a copied token
Merged by ngompa. Opened by kparal.
kparal/ipsilon token_no_newlines  into  master

Download 371.patch

If you select the response token by double-clicking the line and copy-paste it
from Firefox, you'll currently get:

\n\ncode=token\n\n

This is non-ideal, because while the consumer library (in my case, bodhi-client)
can handle the initial extra newlines, perhaps not all consumers will.
Additionaly, the first ending newline is used to automatically submit the pasted
line (so you can't even verify it was pasted correctly, it's immediately sent),
and the second ending newline is queued on standard input of the terminal and
will be sent to the CLI app once it asks for any input. In my case that
completely skipped the first interactive input of the app, because Enter is used
to skip in there. That's very inconvenient.

With this patch, double-clicking the line and copy-pasting it from Firefox will
give you:

code=token

exactly as expected, no extra newlines, and you can confirm the input yourself.

In Chromium, there is no change with this patch. Every time you get:

code=token\n

That has one more newline than I'd personally like, but at least it doesn't
cause any unintended behavior in the calling app, because it's consumed by
submitting the input line.

Signed-off-by: Kamil Páral kparal@redhat.com

:thumbsup:

Pull-Request has been merged by ngompa

Metadata