2023 seems to change & to #038; in inline JS code
-
When using the twentytwentythree theme and WooCommerce if I insert some code like this (just a quick example):
<script> $( document ).ready(function() { url = ''; url += '?test=1' url += '&something=1' // Ampersand here becomes #038; on some hosts $( '#select option' ).val( url ); }); $( document ).on( 'change', '#select', function( e ) { window.location = $( this ).val(); }); </script> <select id="select"> <option value="">Test</option> <option value="">Test</option> </select>
Via the woocommerce_after_add_to_cart_quantity hook, it changes the ampersands in the URL we are building to add to an option value from
&
to#038;
resulting in not being able to use the$_GET
via PHP correctly, if I switch to another theme those URLs aren’t changed, why is twentytwentythree doing this different? What is causing this?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘2023 seems to change & to #038; in inline JS code’ is closed to new replies.