Commit 7ceb839
committed
HTML API: Test and fix SVG script handling.
When support was added for foreign content, an ambiguity in the HTML specification led to code that followed the wrong path when encountering a self-closing SCRIPT element in the SVG namespace. Further, a fallthrough was discovered during manual testing.
This patch adds a new test to assert the proper behaviors and fixes these issues. In the case of the SCRIPT element, the outcome was the same with the wrong code path, making the defect benign. In the case of the fallthrough, the wrong behavior would occur.
The updates in this patch also resolves a todo relating to the spec ambiguity.
Developed in #7164
Discussed in https://core.trac.wordpress.org/ticket/61576
Follow-up to [58868].
Props: dmsnell, jonsurrell.
See #61576.
git-svn-id: https://develop.svn.wordpress.org/trunk@58871 602fd350-edb4-49c9-b593-d223f7449a821 parent b9014d6 commit 7ceb839
File tree
2 files changed
+25
-14
lines changed- src/wp-includes/html-api
- tests/phpunit/tests/html-api
2 files changed
+25
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4239 | 4239 | | |
4240 | 4240 | | |
4241 | 4241 | | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
4242 | 4255 | | |
4243 | 4256 | | |
4244 | | - | |
4245 | | - | |
4246 | | - | |
4247 | | - | |
4248 | | - | |
4249 | | - | |
4250 | | - | |
4251 | | - | |
4252 | | - | |
4253 | | - | |
4254 | | - | |
4255 | | - | |
4256 | | - | |
| 4257 | + | |
4257 | 4258 | | |
4258 | 4259 | | |
4259 | 4260 | | |
| |||
4263 | 4264 | | |
4264 | 4265 | | |
4265 | 4266 | | |
| 4267 | + | |
4266 | 4268 | | |
4267 | 4269 | | |
4268 | 4270 | | |
4269 | 4271 | | |
4270 | 4272 | | |
4271 | 4273 | | |
4272 | | - | |
4273 | 4274 | | |
4274 | 4275 | | |
4275 | 4276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
524 | 534 | | |
0 commit comments