Tag Processor: Support RCData and Script tag closers#4164
Tag Processor: Support RCData and Script tag closers#4164adamziel wants to merge 7 commits intoWordPress:trunkfrom
Conversation
With this commit, Tag Processor can navigate to </script>, </textarea>, and </title> tag closers. Without this commit, the Tag Processor skips over them. Tag closers are supported by Tag Processor so it only makes sense to consistently support all of them.
dmsnell
left a comment
There was a problem hiding this comment.
A very good addition here, @adamziel
If I had one thing to suggest is that maybe we don't need a separate test for this, that we could put the additional tags in existing tag closer tests.
Also I don't find the abstraction of the script name useful in the tests. I would probably prefer to see <script></script> rather than script that then gets interpolated as such within the test. that's just my style preference though.
|
@adamziel https://core.trac.wordpress.org/ticket/56299 is closed. I opened a new Trac ticket for this enhancement. Question: Has this already been released in Gutenberg? If no, then likely this needs to move to 6.3. |
Co-authored-by: Tonya Mork <tonya.mork@automattic.com>
|
@hellofromtonya it haven't been released in Gutenberg yet, no. Let's punt to 6.3 then. Or 6.2.1? I'll loop in @ntsekouras and @Mamaduka just in case |
Enhancements need to go into a major. I'll move it to 6.3. Thank you @adamziel! |
|
Also wondering @adamziel @dmsnell, 6.3 is set to release in August 2023. Instead of continuing development in Core on the HTML API, might be better to continue its refinement and enhanced support / capability back to Gutenberg. Then backport them to Core when ready. That way, each can gain faster testing and feedback cycles. What do you think? |
@hellofromtonya oh this is a bugfix, not an enhancement. The Tag Processor should have never omitted these tag closers in the first place. |
@adamziel thank you for clarifying! Is this bug fix essential for 6.2? If yes, it could be committed into 6.2, but will trigger another beta release. Or as you noted, it could go into 6.2.1. |
|
@hellofromtonya all good, 6.2.1 should be fine. I'll reply to your other comment later on |
There are a few reasons these Tag Processor PRs are targeting core now:
|
|
@hellofromtonya @dmsnell I went for a separate test case without a data provider to test both cases ( |
hellofromtonya
left a comment
There was a problem hiding this comment.
- Confirming this is a bugfix, fixing that the processor shouild stop on RCData nad Script tag closers ✅
- Has good happy and unhappy path test coverage ✅
Ready for commit 👍
|
Confirmed:
Test Report https://core.trac.wordpress.org/ticket/57852#comment:16 |
|
Committed via https://core.trac.wordpress.org/changeset/55469. |
Description
With this PR, Tag Processor can navigate to
</script>,</textarea>, and</title>tag closers:Without this commit, Tag Processor skips over them:
Tag closers are supported by Tag Processor so it only makes sense to consistently support all of them.
cc @ockham @dmsnell @hellofromtonya @gziolo
Trac ticket: https://core.trac.wordpress.org/ticket/57852