Skip to content

Return allowed KSES tags if not an array#3879

Merged
westonruter merged 2 commits intodevelopfrom
fix/scalar-kses-tags
Dec 4, 2019
Merged

Return allowed KSES tags if not an array#3879
westonruter merged 2 commits intodevelopfrom
fix/scalar-kses-tags

Conversation

@pierlon
Copy link
Copy Markdown
Contributor

@pierlon pierlon commented Dec 4, 2019

Summary

As discovered on the support forums, wp_kses_allowed_html does accept string values. If such a value is received from the wp_kses_allowed_html filter hook it should be returned immediately as it would be for a different context we do not handle.

Checklist

  • My pull request is addressing an open issue (please create one otherwise).
  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@googlebot googlebot added the cla: yes Signed the Google CLA label Dec 4, 2019
@pierlon pierlon requested a review from westonruter December 4, 2019 05:46
@pierlon pierlon self-assigned this Dec 4, 2019
Copy link
Copy Markdown
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the phpDoc to indicate the param and return value can be an array or string.

@pierlon pierlon requested a review from westonruter December 4, 2019 06:32
@westonruter westonruter added this to the v1.4.2 milestone Dec 4, 2019
@westonruter westonruter merged commit aa71be5 into develop Dec 4, 2019
@westonruter westonruter deleted the fix/scalar-kses-tags branch December 4, 2019 08:04
westonruter pushed a commit that referenced this pull request Dec 4, 2019
* Return allowed KSES tags if not an array

* Update PHPDoc to indicate a string param or return value is possible
westonruter added a commit that referenced this pull request Dec 4, 2019
…meo-shortocode-support

* 'develop' of github.com:ampproject/amp-wp: (159 commits)
  Return allowed KSES tags if not an array (#3879)
  Update dependency @wordpress/date to v3.6.0 (#3739)
  Update dependency @babel/plugin-proposal-object-rest-spread to… (#3813)
  Update dependency @babel/core to v7.7.4 (#3686)
  Update dependency @wordpress/api-fetch to v3.7.0 (#3731)
  Update dependency @wordpress/keycodes to v2.7.0 (#3745)
  Bundle common font files for externalizing data: URLs (#3866)
  Update dependency css-loader to v3.2.1 (#3870)
  Update dependency core-js to v3.4.7 (#3873)
  Update dependency core-js to v3.4.5 (#3695)
  Update dependency eslint-plugin-react to v7.17.0 (#3845)
  Update dependency eslint-plugin-jest to v23.1.1 (#3702)
  Update dependency eslint to v6.7.2 (#3811)
  Update dependency autoprefixer to v9.7.3 (#3850)
  Update dependency browserslist to v4.8.0 (#3849)
  Remove second sentence from paired browsing dialog
  Add async attribute to amp-paired-browsing-client script
  Restrict paired browsing to when dev mode is enabled
  Add robots noindex/nofollow meta tag in paired browsing app
  Remove extraneous method in favor of (temporary) closure
  ...
westonruter added a commit that referenced this pull request Dec 19, 2019
* tag '1.4.2': (25 commits)
  Bump 1.4.2
  Bump 'tested up to' to 5.3.2
  Catch unfiltered requests when testing Crowsignal embed (#3956)
  Bump version 1.4.2-RC1
  Bump 'Tested up to' to 5.3.1
  Remove test case for paired browsing since broken in WP4.9 and would not pass in AMP 1.4 (#3928)
  Further refine is_exclusively_dependent and add tests (#3928)
  Only include hoverintent-js in dev mode if exclusive dependency of admin-bar (#3928)
  Include admin-bar script deps in dev mode (e.g. hoverintent-js) (#3928)
  Fix tests after security fix in WP 5.3.1 (r46896) (#3926)
  Add E2E tests to allow_failures
  Convert `theme_features` variable into `get_theme_config` function
  Only apply smooth scroll fix on 'Twenty Twenty' <= 1.0.0
  Re-add smooth scrolling fix on WP < 5.3.1
  No need to apply smooth scrolling fix for Twenty Twenty theme
  Bump stylesheet cache group after #3866 (#3880)
  Return allowed KSES tags if not an array (#3879)
  Bundle common font files for externalizing data: URLs (#3866)
  Pull the built `block-libray` package from Gutenberg SVN if it does not exists (#3847)
  Optimize is_amp_allowed_attribute checking for reference points (#3815)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants