-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Quote: fix raw transform handler #43093
Conversation
Thanks for the quick fix here — good reminder of something to keep an eye on when we open up other blocks for more flexible nested structures. |
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.
Nice.
Size Change: +35 B (0%) Total Size: 1.27 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.
Let's remove node-related changes before committing this. I think those were leftovers from #43091.
Edit: This was resolved.
042173b
to
9a70ce0
Compare
Cherry-picked to the 13.8 branch and released in Gutenberg 13.8.2. ✅ |
What?
Use the correct raw handler depending on the context.
Why?
Currently we're using the
rawHandler
, which is letting too much markup through on paste.How?
We have two raw handlers: a default one (used for legacy context for example) and one for paste.
So far we didn't have the use case for nested raw handlers, so we never ran into this issue before.
We need to use the correct handler in the raw transform depending on which one is running. To solve that we can pass down the handler to the transform callback.
Testing Instructions
See integration test. Diff:
Screenshots or screencast