Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56580 closed defect (bug) (fixed)

Docs: Default parameter value is missing for filter_block_kses_value function

Reported by: armondal's profile armondal Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.1 Priority: normal
Severity: normal Version: 6.0.1
Component: Security Keywords: has-patch
Focuses: docs Cc:

Description

In blocks.php filter_block_kses_value() function inline document dose not mentioned default @param value.
$allowed_protocols @param should have the default value mentioned

Change History (5)

This ticket was mentioned in PR #3260 on WordPress/wordpress-develop by Armondal.


2 years ago
#1

  • Keywords has-patch added; needs-patch removed

This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

#2 @SergeyBiryukov
2 years ago

  • Focuses docs added
  • Milestone changed from Awaiting Review to 6.1

Hi there, welcome to WordPress Trac! Thanks for the ticket.

I think it would be helpful here to mention that the parameter defaults to the result of wp_allowed_protocols().

I've noticed a few other places where the change should be made. Commit incoming :)

#3 @SergeyBiryukov
2 years ago

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

In 54181:

Docs: Clarify the $allowed_protocols default value in various KSES functions.

Add a note that the parameter is optional and defaults to the result of wp_allowed_protocols().

This affects:

  • wp_kses()
  • filter_block_content()
  • filter_block_kses()
  • filter_block_kses_value()

Includes synchronizing the $allowed_html parameter description for consistency.

Follow-up to [649], [6630], [18826], [32603], [43016], [46896], [48478].

Props armondal, SergeyBiryukov.
Fixes #56580.

SergeyBiryukov commented on PR #3260:


2 years ago
#4

Thanks for the PR! Merged in r54181 as part of a slightly larger documentation update.

This ticket was mentioned in Slack in #forums by armondal. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.