Title: JS template literal with https://example.com treated as comment
Last modified: June 27, 2021

---

# JS template literal with https://example.com treated as comment

 *  Resolved [mradzikowski](https://wordpress.org/support/users/mradzikowski/)
 * (@mradzikowski)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/)
 * Hello,
    I think that with the JS code like below:
 *     ```
       const a = 'https://example.com';
       ```
   
 * (‘ should be an ` but this editor doesn’t handle it good as well)
 * the template literal is not detected and with JS minification enabled it’s cut
   after “https:”, so “//” is treated as a start of a comment. This results in a
   broken JS file.
 * Plugin version: 2.1.5
    -  This topic was modified 4 years, 11 months ago by [mradzikowski](https://wordpress.org/support/users/mradzikowski/).
    -  This topic was modified 4 years, 11 months ago by [mradzikowski](https://wordpress.org/support/users/mradzikowski/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/#post-14602893)
 * Hello [@mradzikowski](https://wordpress.org/support/users/mradzikowski/)
 * Thank you for your suggestion and for bringing this to our attention.
    This became
   a bug since ` wasn’t a valid js code at the time of minification implementation.
   I’ve created a [GitHub issue](https://github.com/W3EDGE/w3-total-cache/issues/392)
   on your behalf. Please make sure to track the progress of the issue regularly.
   Thanks!
 *  Plugin Author [Joe Cartonia](https://wordpress.org/support/users/joemoto/)
 * (@joemoto)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/#post-14717293)
 * [@mradzikowski](https://wordpress.org/support/users/mradzikowski/) Thank you 
   for your patience. A fix has been merged into our master branch. It will be included
   in our pending 2.1.6 patch release.
 *  Thread Starter [mradzikowski](https://wordpress.org/support/users/mradzikowski/)
 * (@mradzikowski)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/#post-14717819)
 * Great to hear it, thank you!
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/#post-14742303)
 * Hello [@mradzikowski](https://wordpress.org/support/users/mradzikowski/)
 * Thank you for your patience.
    This is now fixed in the latest 2.1.6 release. 
   Once again, thank you for bringing this to our attention!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘JS template literal with https://example.com treated as comment’ is closed
to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [js minification](https://wordpress.org/support/topic-tag/js-minification/)

 * 4 replies
 * 3 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/js-template-literal-with-https-example-com-treated-as-comment/#post-14742303)
 * Status: resolved