Opened 2 months ago
Closed 2 months ago
#63965 closed defect (bug) (duplicate)
HTML Validation Error: wp_print_speculation_rules uses type="speculationrules"
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description (last modified by )
In WordPress, the function wp_print_speculation_rules() generates inline scripts like this:
<script type="speculationrules"> ... </script>
While this works correctly in browsers, it fails HTML validation (e.g., W3C Validator) because type="speculationrules" is not a valid MIME type. The validator reports:
Bad value speculationrules for attribute type on element script: Subtype missing.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi and welcome to WordPress Core Trac!
This was already reported on #63289 and #63801.
The
speculationrulesvalue is valid, but the W3C Validator still needs to recognize the speculation rules API.https://github.com/validator/validator/issues/1814