Title: [Plugin: WP-HTML-Compression] Occasionally breaks scripts
Last modified: August 20, 2016

---

# [Plugin: WP-HTML-Compression] Occasionally breaks scripts

 *  Resolved [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/)
 * Hello,
 * I was having a problem with Rafflecopter earlier, where the widget refused to
   load in my post. I found out it is the WP-HTML-Compression plugin that somehow
   removed my JavaScript and stopped the widget from loading.
 * Will this be fixed in a future release? I really like this plugin and it’s a 
   shame I can’t use it because of this problem.
 * Thanks for the help!
 * [http://wordpress.org/extend/plugins/wp-html-compression/](http://wordpress.org/extend/plugins/wp-html-compression/)

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

 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800883)
 * Hi.
    Could you post a link to your site? Perhaps there is a way to avoid code
   breakage. Thanks!
 *  Thread Starter [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800905)
 * I disabled the plugin for now, because there’s a giveaway going on right now (
   and the widget disappears once I activate the plugin), but the link to my site
   is [http://www.justhonest.net](http://www.justhonest.net). The link to the widget
   code can be found here: [http://www.rafflecopter.com/rafl/share-code/ZGZlNDA5NTZiZDRmZDU4N2JjMjhmM2RjZDZhY2MwOjA=/](http://www.rafflecopter.com/rafl/share-code/ZGZlNDA5NTZiZDRmZDU4N2JjMjhmM2RjZDZhY2MwOjA=/)
 * Thanks for your help!
 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800916)
 * Try to set the **type** attribute in your JS script call to see if that makes
   a difference:
 *     ```
       <script type="text/javascript" src="//d12vno17mo87cx.cloudfront.net/embed/rafl/cptr.js"></script>
       ```
   
 *  Thread Starter [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800934)
 * I added the ‘type’ attribute as you suggested, but unfortunately the widget still
   doesn’t show up when I activate the plugin.
 * Thanks for your help. I appreciate it!
 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800940)
 * That is so weird.
    Could you do a [Pastebin](http://pastebin.com) of your home
   page’s HTML code with the WP-HTML-Compression turned on? It doesn’t have to be
   from your production: a dev environment would suffice. Thanks!
 *  Thread Starter [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800941)
 * Here you go: [http://pastebin.com/BCKRXHgq](http://pastebin.com/BCKRXHgq)
 * Thanks for your help!
 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800943)
 * Hi, I took a look at your code. Other than a few validation errors and a lot 
   of inline scripts (both JS and CSS), I don’t see anything in there that could
   be affecting your giveaway script.
    I did notice that your giveaway script’s `
   src` tag is truncated and it’s missing the `http://` part. Try including a full
   URL path in the src see if that makes a difference. Another source of the problem
   could be a plugin or JS library incompatibility, but I don’t see why that would
   affect your external JS script. I’ll keep scratching my head see if I can find
   anything else, 😉
 *  [Marventus](https://wordpress.org/support/users/marventus/)
 * (@marventus)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2800973)
 * Hello again,
 * I grabbed the code you pasted and made some changes and observations to it. You
   can find the new paste [here](http://pastebin.com/jKuSZE1N). You can use the “
   compare” feature to see what’s different, and/or look for
 *     ```
       <!-- Marventus
       ```
   
 * in the code to find my comments.
    Try addressing those validation errors see 
   if there is any progress.
 *  Thread Starter [Naz](https://wordpress.org/support/users/naz/)
 * (@naz)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2801042)
 * Hello,
 * Thanks so much for your help. I really appreciate it! Unfortunately, most of 
   the code you commented on was added by plugins, and I’m not comfortable editing
   these plugin files because they will be overwritten after each update.
 * Does this mean this plugin will not work for me if these issues remain unchanged?
 * Thanks for your time!
 *  Plugin Author [Steven Vachon](https://wordpress.org/support/users/prometh/)
 * (@prometh)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2801065)
 * A new version will be released in the next few days with this issue resolved.
   You may want to schedule a day to remove your compression override comment tags.

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

The topic ‘[Plugin: WP-HTML-Compression] Occasionally breaks scripts’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-html-compression.svg)
 * [WP-HTML-Compression](https://wordpress.org/plugins/wp-html-compression/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-html-compression/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-html-compression/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-html-compression/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-html-compression/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-html-compression/reviews/)

## Tags

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

 * 10 replies
 * 3 participants
 * Last reply from: [Steven Vachon](https://wordpress.org/support/users/prometh/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-html-compression-occasionally-breaks-scripts/#post-2801065)
 * Status: resolved