Opened 12 months ago
Closed 12 months ago
#63965 closed defect (bug) (duplicate)
HTML Validation Error: wp_print_speculation_rules uses type="speculationrules"
| Reported by: | svilupporobyone | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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