[wp-trac] [WordPress Trac] #54179: Raw JS is prematurely ended with a </script> tag when HTML tags are present within JS strings.

WordPress Trac noreply at wordpress.org
Sat Sep 25 16:49:20 UTC 2021


#54179: Raw JS is prematurely ended with a </script> tag when HTML tags are present
within JS strings.
----------------------------+------------------------------
 Reporter:  joshuapeck9898  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  javascript
----------------------------+------------------------------

Comment (by sabernhardt):

 Hi and welcome to Trac!

 I can think of two questions:
 1. Is the custom JS file included in the theme or in a plugin?
 2. Where is the existing DOM element that receives special content from
 the script (is it in the content, header, footer, widget area, etc.)?

 It could be better if all elements exist in the DOM before running the
 script, but you may tried that already.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54179#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list