Jump to content
RadStudio 10.3.1 was released today Read more... ×
Stefan Glienke

Copied text from posts contains garbage character

Recommended Posts

I just noticed yet another time that selecting text from a post contains invisible characters - in this particular case I selected the URL from this post:

by selecting from the starting h of http and moved the mouse a bit to the right and down so it selected the entire rest of the line.

 

When I then clicked "go to" in my context menu (using Chrome) I got a 404 which confused me because the url is valid. I eventually found out that the selected text contained some UTF-8 BOM bytes at the end.

Also when inspecting the elements it showed this:

 

image.png.1b7438520860f3c7ddf8d4b240c67617.png

 

which according to a google search is a zero width no-break space - turning off JS makes them disappear.

The weird spans are also shown with Firefox however selecting the text does not cause it to contain garbage.

 

Edit: I found what is causing the spans with the ZWNBSP - its the "quote selection" popup that leaves them there. So the issue I am describing here only happens when you selected the text, deselected and then selected again to contain the hidden ZWNBSP character.

Edited by Stefan Glienke

Share this post


Link to post

I'm used to other on-web-page editors to have Ctrl+K pop up the 'link' dialog box so I can paste a URL. Here you have to click the link icon. I've updated my original post.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×