I can not dig out where they come from. Wordpress 5.0.3. I tried to disable all plugins. Went through the different ways that type = 'text / javascript' is removed. And this Remove type = 'text / javascript' from the call of Wordpress scripts , and this is https://wordpress.stackexchange.com/questions/287830/remove-type-attribute-from-script-and-style-tags-added-by -wordpress

I connected the scripts both as expected, and inserted them directly into the header, and using add_action on 'wp_head', with different priorities.

The result is the same - at the output tags of the form <script type="8ed8dc17de967833ca9721df-text/javascript"> , the combination of characters changes.

Why actually need it. You need to add a script from GoogleAnalytics. And it seems to work, but because of these extra characters does not pass the test.

enter image description here

Where to look?

PS I tried the variant with such a regular schedule:

 add_action('wp_loaded', 'output_buffer_start'); function output_buffer_start() { ob_start("output_callback"); } add_action('shutdown', 'output_buffer_end'); function output_buffer_end() { ob_end_flush(); } function output_callback($buffer) { return preg_replace( "%[ ]type=[\'\"](.*?)-text\/(javascript|css)[\'\"]%", '', $buffer ); } 
  • WP does not create such tags. Disable all plugins, change the theme to the standard one, reinstall the kernel. - KAGG Design
  • Thanks for the answer, wp really had nothing to do with it. - Yuriy

1 answer 1

In general, as a result, it turned out that chocolate wp is not to blame, plug-ins too, such things are done by cloudflare, behind which the site sits.