WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 10 months ago

#37841 closed task (blessed) (fixed)

HTML 5 syntax error with rel='https://api.w.org/'

Reported by: zhanglide2018 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: REST API Keywords:
Focuses: Cc:

Description

HTML 5 syntax error with rel='https://api.w.org/', can not pass W3C validation.


Validator URL:https://validator.w3.org/


Validator output:

Error: Bad value https://api.w.org/ for attribute rel on element link: The string https://api.w.org/ is not a registered keyword.
From line 52, column 1; to line 52, column 73
</script><link rel='https://api.w.org/' href='https://hyper-matrix.org/wp-json/'/><scri

Change History (9)

#1 follow-up: @GaryJ
3 years ago

Hi zhanglide2018 - welcome, and thanks for opening your first ticket.

I think the issue you've found might be a duplicate of #37800. Try the patch there, and if that fixes your issue, then this one can be closed as a duplicate.

#2 in reply to: ↑ 1 @zhanglide2018
3 years ago

Replying to GaryJ:

Hi zhanglide2018 - welcome, and thanks for opening your first ticket.

I think the issue you've found might be a duplicate of #37800. Try the patch there, and if that fixes your issue, then this one can be closed as a duplicate.

Hi GaryJ, thank you for your reply and help. I have already checked #37800, but it doesn't fix my issue.

#3 follow-up: @rmccue
3 years ago

  • Type changed from defect (bug) to task (blessed)

I dug into this a bit; custom URI relations are not valid in the WHATWG HTML spec per this issue, however they are valid in the W3C HTML5 spec per this issue (basically same as the other one).

Anyway, the text of the W3C spec says:

The remaining values must be accepted as valid if they are absolute URLs containing US-ASCII characters only and rejected otherwise.

That's true for https://api.w.org/. I suspect the issue is that the validator is coded to follow the WHATWG spec, rather than the W3C spec.

Anyway, tl;dr, we can add it to the Microformats page, and then it's definitely valid in either spec.

This is hence a task to add to that wiki page. :)

#4 in reply to: ↑ 3 @zhanglide2018
3 years ago

Replying to rmccue:

I dug into this a bit; custom URI relations are not valid in the WHATWG HTML spec per this issue, however they are valid in the W3C HTML5 spec per this issue (basically same as the other one).

Anyway, the text of the W3C spec says:

The remaining values must be accepted as valid if they are absolute URLs containing US-ASCII characters only and rejected otherwise.

That's true for https://api.w.org/. I suspect the issue is that the validator is coded to follow the WHATWG spec, rather than the W3C spec.

Anyway, tl;dr, we can add it to the Microformats page, and then it's definitely valid in either spec.

This is hence a task to add to that wiki page. :)

Thanks a lot!

#5 @rmccue
3 years ago

  • Milestone Awaiting Review deleted

This is a task unrelated to WP releases, so removing Milestone.

#6 @zhanglide2018
3 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

#7 @rmccue
2 years ago

#40074 was marked as a duplicate.

#8 @rmccue
2 years ago

  • Resolution changed from worksforme to fixed

This was added to the Microformats wiki page, so is totally a valid relation; this means the ticket is fixed, rather than worksforme. :)

#9 @ocean90
10 months ago

#45536 was marked as a duplicate.

Note: See TracTickets for help on using tickets.