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

Clipboard issues with escape characters #1821

Closed
fxha opened this issue Dec 14, 2019 · 3 comments · Fixed by #2197
Closed

Clipboard issues with escape characters #1821

fxha opened this issue Dec 14, 2019 · 3 comments · Fixed by #2197
Assignees
Labels
🔭 area/muya 🐛 bug Something isn't working
Projects

Comments

@fxha
Copy link
Contributor

fxha commented Dec 14, 2019

Description

All JavaScript escape characters are encoded before copied to clipboard. E.g. f'(x) is copied as f'(x) to clipboard.

Expected behavior:

f'(x)

Actual behavior:

f'(x)

Versions

  • Mark Text: v0.16.0.rc-2
  • Operating system: all
@fxha
Copy link
Contributor Author

fxha commented Jun 6, 2020

@Jocs gabrielegiammatteo@3960f42

Why do we escape the content when setting data to the clipboard? I think we should only escape in the second case because we import from clipboard, right?

@fxha fxha added this to To Do in 0.16.2 Jun 7, 2020
@Jocs
Copy link
Member

Jocs commented Jun 7, 2020

I don’t remember the specific reason, maybe it is to prevent XSS attacks?

@fxha
Copy link
Contributor Author

fxha commented Jun 7, 2020

I don't think so because it's on the plain text. I'll submit a PR to remove escape from the plain text but the others are needed to display HTML correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔭 area/muya 🐛 bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants