-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax HTML validation for Fortunes test
Some frameworks, such as Next.js, automatically inject `<meta>`, `<link>`, and `<script>` tags into pages rendered by their templating system. Since the Fortunes test is meant to exercise the templating system (as opposed to raw string concatenation), it should allow these tags. Furthermore, React warns against nesting a `<tr>` directly inside a `<table>` ("<tr> cannot be a child of <table>") because browsers will automatically wrap the `<tr>` elements in a `<tbody>`, causing a mismatch with the virtual DOM. Therefore, the Fortunes test should allow optional `<tbody>` (and `<thead>`) tags. This commit relaxes the HTML validation for the Fortunes test to allow these tags by simply ignoring them when building the comparison string.
- Loading branch information
1 parent
ddd0952
commit 7f84497
Showing
1 changed file
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters