Proxyman icon indicating copy to clipboard operation
Proxyman copied to clipboard

When copying text from the UI whitespace characters are copied as "·"

Open seidnerj opened this issue 2 years ago • 5 comments

Description

whitespace characters not copied with the original character

Steps to Reproduce

  1. Record a session
  2. Go to the headers table
  3. Find a header with white space (e.g. the accept header, that has a value of 'text/plain,·/;·q=0.01')
  4. Copy the header's text
  5. Paste the value in some editor

Current Behavior

Whitespace characters are copied as "·" character

Expected Behavior

Whitespace character should be copied with their original value

Environment

  • App version: Proxyman 4.8.0
  • macOS version: macOS Ventura 13.4

seidnerj avatar Jun 19 '23 21:06 seidnerj

@seidnerj It seems the Show Invisibles in the View Menu is enabled, so it displays the space as a · -> Copy it will include the . too

You should turn the Invisibles OFF, so the bug is fixed 👍

NghiaTranUIT avatar Jun 20 '23 01:06 NghiaTranUIT

I actually think that these should be separate, from a display-only perspective show invisibles is a great feature, but there should be a separation between the display value and the actual value. Regardless of what is displayed, when copying - the original value should be preserved.

seidnerj avatar Jun 20 '23 05:06 seidnerj

@NghiaTranUIT since I was about to create the same issue, I am bumping this issue instead of creating a new one. As @seidnerj mentioned, it would be great if the "Show Invisibles" option only affected the display/rendering, not the actual content.

In Proxyman, the implementation of "Show Invisibles" is correct in some sections.

Body tab (correct behavior) Header tab (unexpected behavior)
Screenshot 2024-04-24 at 3 29 48 PM Screenshot 2024-04-24 at 3 29 58 PM

raxityo avatar Apr 24 '24 19:04 raxityo

@raxityo do you think that "Show invisible" should not display the whitespace?

Honestly, I'm not sure how to fix it because the Copy action is handled by the system, so I can't override and ignore the whitespace.

Don't render the whitespace might easily fix it.

NghiaTranUIT avatar Apr 25 '24 01:04 NghiaTranUIT

@raxityo do you think that "Show invisible" should not display the whitespace?

No, I meant to suggest that this option should only display the whitespace character () as a background.

Sorry if my examples were confusing. I meant that the behavior we see in the Body tab in ProxyMan is correct. "Show Invisibles" correctly shows the whitespace character, but it's rendered as a background instead of part of the text. So when you copy the text in the Body tab, the character does not get copied. However, in the "Header" tab in ProxyMan, the character is part of the text rather than displaying it as background.

Expected Behavior:

image

Unexpected Behavior:

image

raxityo avatar Apr 25 '24 17:04 raxityo