File tree Expand file tree Collapse file tree
tests/phpunit/tests/rest-api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3107,6 +3107,19 @@ public function test_comment_roundtrip_as_editor_unfiltered_html() {
31073107 }
31083108 }
31093109
3110+ /**
3111+ * Ensures that saving a comment as a super-admin does not corrupt the
3112+ * comment content when presented with common edge cases.
3113+ *
3114+ * Note that this test used to assert the wrong behavior due to a bug
3115+ * in {@see wp_html_split()}. Whereby the unescaped `<` used to be
3116+ * mistakenly identified as the start of an HTML tag or comment, this
3117+ * led to accidental replacement “inside” the mistaken tag. The test
3118+ * has been updated with `wp_html_split()` in accordance with the
3119+ * HTML5 living specification.
3120+ *
3121+ * @ticket {TICKET_NUMBER}
3122+ */
31103123 public function test_comment_roundtrip_as_superadmin () {
31113124 wp_set_current_user ( self ::$ superadmin_id );
31123125
You can’t perform that action at this time.
0 commit comments