Wordpress 4.9.1 Bug of CUSTOM_TAGS throws WarningsteemCreated with Sketch.

in #utopian-io9 years ago

The Wordpress 4.9.1. has just been released. I have tried to enable the customize tag e.g. script in my post, and it throws the following warning:

Warning: in_array() expects parameter 2 to be array, null given in wp-includes/kses.php on line 1416

Screenshot:

wordpress-bug.jpg

The steps to reproduce:

  1. add define('CUSTOM_TAGS', true); in wp_config.php under your wordpress root directory.
  2. add the following to functions.php template
function add_scriptfilter( $string ) {
  global $allowedtags;
  $allowedtags['script'] = array( 'src' => array () );
  return $string;
}

add_filter( 'pre_kses', 'add_scriptfilter' );

and then the warning will be thrown on all pages/posts.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thank you!

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.090
BTC 62666.97
ETH 1762.17
USDT 1.00
SBD 0.39