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

When modifying the link in anchor text and using the Yoast SEO and sponsored attributes, the link is split into two parts. #21052

Open
4 tasks done
michaelbriantina opened this issue Jan 18, 2024 · 2 comments
Labels

Comments

@michaelbriantina
Copy link

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When you add a link to text in the post, and then highlight it and edit it, and add the 'opens in new tab', '', and 'sponsored' attributes and save the changes, it splits the link into two.

To Reproduce

Step-by-step reproduction instructions

  1. Install and activate Yoast SEO 21.8 and use a default WP theme
  2. Create a new post and add a link/anchor text to content in the post that has at least two words (e.g. Yoast SEO)
  3. Highlight (very specific step, don't just click on the link) the anchor text, click on the pencil icon, and add the 'opens in new tab', '', 'sponsored' attribute and save the changes. Sometimes it doesn't happen on the first link, and you'll need to reproduce it on a second link.

Expected results

  1. That the anchor text or link would still be in one single section.

Actual results

  1. The links are split into two (one seems to have the 'open in new tab' option selected and the other attributes, and the other one doesn't have any of the selected attributes)

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Screen.Recording.2024-01-18.at.10.38.02.AM.mov

When deactivating the Yoast SEO plugin and just using the default 'opens in a new tab' and '' anchor text link options, the issue doesn't seem to occur. But it doesn't look to be specific to the 'sponsored' option, as even if you don't choose all 3 settings, the issue still occurs.

When you click on the link to edit it, instead of highlighting it, the issue doesn't seem to occur.

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Which browser is affected (or browsers):
  • Chrome

Used versions

  • Device you are using: MacBook Pro M1
  • Operating system: MacOS
  • PHP version: PHP 8.0
  • WordPress version: 6.2
  • WordPress Theme: Twenty-Twenty
  • Yoast SEO version: 21.8
@michaelbriantina
Copy link
Author

Please inform the customer of conversation # 1094090 when this conversation has been closed.

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

No branches or pull requests

3 participants