Title: Breaks with HTML minification
Last modified: August 31, 2016

---

# Breaks with HTML minification

 *  Resolved [Bryan Willis](https://wordpress.org/support/users/codecandid/)
 * (@codecandid)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/)
 * Not sure if this has to do with caching or ajax settings, but I tried them all
   and couldn’t seem to get to to work with minification.
 * Anyway, when using this plugin with html minification plugins like [Stone Cold Compressor](https://wordpress.org/plugins/stone-html-compressor/),
   the widget output doesn’t render. This seems to be the only issue with that plugin
   I’ve had which is why I posted the issue here instead of there.
 * Any help would be great. Thanks!
 * [https://wordpress.org/plugins/wordpress-popular-posts/](https://wordpress.org/plugins/wordpress-popular-posts/)

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

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7202955)
 * Hi there!
 * Can’t say for sure since I’ve never used that plugin before and don’t know how
   its HTML minification feature works. I’ll give it a try and get back here as 
   soon as I can.
 *  Thread Starter [Bryan Willis](https://wordpress.org/support/users/codecandid/)
 * (@codecandid)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7203007)
 * Cool thanks for the quick reply. I looks like it uses the output buffer and regex.
   Not sure if somehow the regex is stripping it out or if maybe it has something
   to do with ajax/caching, but I tried changing the WPP plugin settings but no 
   luck.
 * Anyway, thanks for any feedback, I’ll try to look into more myself and figure
   out in the meantime.
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7203028)
 * Hi Bryan,
 * The problem is that when the Stone HTML Compressor plugin minifies the HTML code
   it doesn’t remove JavaScript comments (including CDATA) which breaks WPP when
   the “Ajaxify widget” option is enabled. If the Ajaxify widget option is disabled,
   WPP works just fine – even if the HTML code is minified.
 * I’m not sure if the Stone HTML Compressor plugin should also remove JavaScript
   comments or not, but I think it would be good if it did. I’m sure WPP isn’t the
   only one affected by this issue. Maybe you should ask the developer and see what
   he/she has to say about it.
 * Anyways, I made a few changes to WPP to make sure it doesn’t break when HTML 
   minification plugins that doesn’t strip out JavaScript comments are being used.
   For the time being, you’ll have to either disable WPP’s Ajaxify Widget feature
   or disable the Stone HTML Compressor plugin until WPP v3.3.4 is released.
 *  Thread Starter [Bryan Willis](https://wordpress.org/support/users/codecandid/)
 * (@codecandid)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7203068)
 * Awesome thanks Hector. I’ll let the plugin author know, but I should be able 
   to figure out how to add that feature myself… I noticed that plugin didn’t remove
   css comments either which is something I’ll try to get added.
 * Anyway, thanks for the good support. Keep up the great work.
 *  [Tim Eckel](https://wordpress.org/support/users/teckel/)
 * (@teckel)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7203085)
 * I tested the WordPress Popular Posts plugin with my [Minify HTML](https://wordpress.org/plugins/minify-html-markup/)
   plugin and it appears to work just fine. You may want to give Minify HTML a try
   instead.
 * Tim

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

The topic ‘Breaks with HTML minification’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

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

 * 5 replies
 * 3 participants
 * Last reply from: [Tim Eckel](https://wordpress.org/support/users/teckel/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/breaks-with-html-minification/#post-7203085)
 * Status: resolved