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

Unwanted markdown is inserted when pasting an URL to edit a link #2379

Open
4 tasks done
foresto opened this issue Feb 27, 2024 · 0 comments
Open
4 tasks done

Unwanted markdown is inserted when pasting an URL to edit a link #2379

foresto opened this issue Feb 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@foresto
Copy link

foresto commented Feb 27, 2024

Requirements

  • This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • Please check to see if this issue already exists.
  • It's a single bug. Do not report multiple bugs in one issue.
  • It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

When editing a comment, highlighting a link target and pasting an URL to replace it inserts unwanted markdown instead of the inserting the URL.

If the user doesn't notice, the result is a garbage link.

If they do notice, they then have to painstakingly select and delete the automatically inserted markdown in order to correct the damage. (This is especially tiresome with long URLs.)

Steps to Reproduce

  1. Submit a comment with a markdown url [like this](https://example.com/).
  2. Copy a different URL to the clipboard.
  3. Edit the comment.
  4. Select the original URL.
  5. Paste over the original URL.

The actual result:

[like this]([https://example.com/](https://example.net/))

The expected result:

[like this](https://example.net/)

Technical Details

This smells like #2116 / #2141 in action. I wish I could turn it off. IMHO, corrupting user input when the user didn't request it is a terrible idea.

Tested on Firefox, though I don't imagine the browser makes a difference.

Lemmy Instance Version

BE: 0.19.3

Lemmy Instance URL

https://lemmy.ca/

@foresto foresto added the bug Something isn't working label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant