-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Buttons: Fix links inside links #29273
Conversation
…or tags before saving.
Size Change: +44 B (0%) Total Size: 1.38 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tests well for me 👍
- The button block now gracefully handles links pasted into it
- The file block's download button also prevents the invalid state
- Regex works well
@aristath Does this one look okay to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Should we intercept pasting a link and apply it to the URL field instead? |
That could be a good improvement, yes. 👍 |
Fixes #24722
Description
When a link is pasted inside of a button block or a file download block button, the block becomes invalid and does not render correctly in the front end. See #24722. This PR strips anchors from text content in these buttons so that they cannot be added within another anchor.
How has this been tested?
Tested locally.
Checklist: