[wp-trac] [WordPress Trac] #39482: wp_customize_support_script() has a javascript comment which breaks one-lined html.

WordPress Trac noreply at wordpress.org
Wed Feb 28 05:12:38 UTC 2018


#39482: wp_customize_support_script() has a javascript comment which breaks one-
lined html.
--------------------------+------------------------------
 Reporter:  agrabush      |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Customize     |     Version:  4.7
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by westonruter):

 Replying to [comment:11 dylanfitzger]:
 > Site speed is of top concern for me. I use HTML compression on many of
 my sites, but this comment causes a lot of problems. JS Console error
 “Uncaught SyntaxError: Unexpected end of input”. Simply removing this
 comment would save me a lot of headaches. Why aren't we able to fix this
 issue?

 Per [comment:9 SergeyBiryukov]:
 > It's not hard, but the same issue could happen in a plugin or theme,
 which would be hard to track down, so in the long run I think it's better
 to use proper minification tools that handle JS comments correctly.

 Any theme or plugin that outputs a single-line comment will face the same
 problem. Changing the script in core will fix this one symptom but the
 underlying problem will remain: the HTML compressor is faulty.

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


More information about the wp-trac mailing list