Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slate zero width is rendered with UTF8 BOM symbol #2722

Closed
glebtv opened this issue Apr 30, 2019 · 3 comments
Closed

Slate zero width is rendered with UTF8 BOM symbol #2722

glebtv opened this issue Apr 30, 2019 · 3 comments

Comments

@glebtv
Copy link

glebtv commented Apr 30, 2019

Do you want to request a feature or report a bug?

Bug

What's the current behavior?

Slate currently renders data-slate-zero-width elements with UTF8 BOM character inside in Chrome

This is very annoying for users copying, for example, links text from Slate, as BOM character is inserted after the link.

Repoduction:

https://www.slatejs.org/#/links
Delete preset content
Add a link paste a link over some text
UTF8 BOM   (\xEF\xBB\xBF or ) appears after the link

DeepinScreenshot_select-area_20190430063244

What's the expected behavior?

Content copied from Slate does not contain garbage characters

@glebtv
Copy link
Author

glebtv commented Apr 30, 2019

This is an EXTREMELY nasty character to add to a text editor
https://en.wikipedia.org/wiki/Byte_order_mark
https://medium.freecodecamp.org/a-quick-tale-about-feff-the-invisible-character-cd25cd4630e7

I think for most uses this is NOT zero-width space (which seems to be the intended character), and even a correct-to-use invisible character should not be present in copied content.

Related: #1971 #2597

@ianstormtaylor
Copy link
Owner

Hey, thanks for reporting this. I think this is actually a duplicate of #2597, so I'm going to close this in favor of that one. Feel free to comment over there with any other info!

@YaoKaiLun
Copy link
Contributor

I found that this is happen in old version of Chrome, like v83.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants