[wp-trac] [WordPress Trac] #61540: WordPress html block breaks scripts.

WordPress Trac noreply at wordpress.org
Sat Jun 29 15:45:43 UTC 2024


#61540: WordPress html block breaks scripts.
--------------------------+-----------------------------
 Reporter:  programmin    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.5.5
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I put in a custom html block and it breaks the script I enter, by turning
 && into &&

 To test this, just enter this in HTML block on a new page:

 {{{

 <script>
 jQuery(function($){
   if(vA!=win && vB!=win && vC==win && vD!=win)  console.log('else');
   if(vA<500 && vB<500 ) console.log('some other case');
 });
 </script>
 }}}

 For whatever reason, WP chooses to turn my script to & entity on some
 lines:

 {{{

 jQuery(function($){
   if(vA!=win && vB!=win && vC==win && vD!=win)  console.log('else');
   if(vA<500 && vB<500 ) console.log('some other case');
 });


 }}}

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


More information about the wp-trac mailing list