-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Rich text: Honour embed-URL-on-paste setting for internal values too #58786
Conversation
Size Change: +7 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
I think I tracked down the cause: #57487 (comment) While this fixes embeds, does it fix link on paste too? Would be good to have an e2e test. We can set the |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
In the issue, Riad claims a different cause: #57487 (comment)
Not sure I understand: link on paste was the one thing I sought to fix. |
// If the data comes from a rich text instance, we can directly use it | ||
// without filtering the data. The filters are only meant for externally | ||
// pasted content and remove inline styles. | ||
if ( isInternal ) { |
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 works, but I would much rather make the logic below that handles __unstablePasteRule
transforms reusable and run it here as well, instead of making an exception for URLs and letting that from through the paste handler for nothing. What do you think?
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.
@ellatrix: Fine by me! This was just a quick stab, but I'll happily defer to a more comprehensive solution of your making.
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.
Here's what I meant: #59063
Closing in favour of #59063 |
Fixes #57487
Here's a quick stab from someone with limited knowledge of Rich Text. Can this break other things? :)