[wp-trac] [WordPress Trac] #59886: enqueue scripts is html encoding the resulting string

WordPress Trac noreply at wordpress.org
Sat Nov 11 00:04:27 UTC 2023


#59886: enqueue scripts is html encoding the resulting string
--------------------------+-----------------------------
 Reporter:  probed        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.4
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 {{{#!php
 <?php
 add_filter('clean_url', function ($url) {
                 if (strpos($url, 'spektrix-component-loader') === false) {
 // not our file
                     return $url;
                 }
                 return "$url' async data-components='spektrix-login-status
 ,spektrix-donate,spektrix-merchandise,spektrix-memberships,spektrix-
 basket-summary,spektrix-gift-vouchers";
             }, 11, 1);
             wp_enqueue_script('webcomponents-spektrix',
 'https://webcomponents.spektrix.com/stable/spektrix-component-loader.js');

 }}}
 causes things to be encoded in the url
 this worked in prev versions
 wp 6.4.1

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59886>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list