WordPress.org

Make WordPress Core

#45014 closed enhancement (fixed)

REST API: Declare unfiltered_html capability using JSON Hyper Schema `targetSchema`

Reported by: danielbachhuber Owned by: danielbachhuber
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch has-unit-tests fixed-5.0
Focuses: rest-api Cc:
PR Number:

Description

Following up on #44287, the REST API also needs to declare unfiltered_html using JSON Hyper Schema targetSchema.

This was originally added to Gutenberg with Add "Convert to blocks" option in HTML block

Attachments (2)

45014.1.diff (3.5 KB) - added by danielbachhuber 16 months ago.
45014.2.diff (3.5 KB) - added by danielbachhuber 16 months ago.
Fix the schema property structure

Download all attachments as: .zip

Change History (7)

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


16 months ago

@danielbachhuber
16 months ago

Fix the schema property structure

#2 @danielbachhuber
16 months ago

  • Owner set to danielbachhuber
  • Resolution set to fixed
  • Status changed from new to closed

In 43682:

REST API: Declare unfiltered_html capability in links.

Because user capabilities can be modified at runtime, the REST API needs to expose them in some evaluated but declarative manner for clients to interpret. JSON Hyper Schema targetSchema provides an appropriate paradigm for doing so.

Props timothyblynjacobs.
Fixes #45014.

This ticket was mentioned in Slack in #core-committers by sergey. View the logs.


16 months ago

#4 @SergeyBiryukov
16 months ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for merging to trunk.

#5 @jorbin
14 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43974:

REST API: Declare unfiltered_html capability in links.

Because user capabilities can be modified at runtime, the REST API needs to expose them in some evaluated but declarative manner for clients to interpret. JSON Hyper Schema targetSchema provides an appropriate paradigm for doing so.

Merges [43682] to trunk.

Props timothyblynjacobs.

Fixes #45014.

Note: See TracTickets for help on using tickets.