Fix MSIE conditionals regex in minify output #2120

Merged
merged 3 commits into from Jan 6, 2013

Conversation

Projects
None yet
2 participants

Allows IE conditionals like the following to remain unmodified (from html5boilerplate):

<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

Without the change, the comment is not fully removed, remains unclosed, and the entire document is treated as commented!

Credit to joebert - regex from
http://www.sitepoint.com/forums/showthread.php?696559-Regex-pattern-to-strip-HTML-comments-but-leave-conditonals&s=3eef4ceb0a59b2fdb946fa56220fb6fd&p=4678083&viewfull=1#post4678083

Michael Dodge added some commits Jan 5, 2013

Fix MSIE conditionals regex in minify output func
Allows IE conditionals like the following to remain unmodified.

<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

Credit to joebert regex from
http://www.sitepoint.com/forums/showthread.php?696559-Regex-pattern-to-strip-HTML-comments-but-leave-conditonals&s=3eef4ceb0a59b2fdb946fa56220fb6fd&p=4678083&viewfull=1#post4678083
Fix MSIE conditionals regex in minify output
Allows IE conditionals like the following to remain unmodified.
```html
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
```
Credit to joebert regex from

http://www.sitepoint.com/forums/showthread.php?696559-Regex-pattern-to-strip-HTML-comments-but-leave-conditonals&s=3eef4ceb0a59b2fdb946fa56220fb6fd&p=4678083&viewfull=1#post4678083

@mikezilla mikezilla referenced this pull request in pyrocms/pyrocms Jan 6, 2013

Merged

Fix MSIE conditionals regex in minify output #2199

narfbg added a commit that referenced this pull request Jan 6, 2013

Merge pull request #2120 from mikezilla/develop
Fix MSIE conditionals regex in minify output

@narfbg narfbg merged commit 85adeed into bcit-ci:develop Jan 6, 2013

1 check failed

default The Travis build failed
Details

nonchip pushed a commit to nonchip/CodeIgniter that referenced this pull request Jun 29, 2013

Merge pull request #2120 from mikezilla/develop
Fix MSIE conditionals regex in minify output

narfbg added a commit that referenced this pull request Dec 15, 2014

Remove output minifier
This feature has proven to be problematic and it's not nearly
as flexible as a dedicated minifier library like Minify
(http://www.minifier.org/, https://github.com/matthiasmullie/minify).

The same results in terms of saving traffic can also be achievied via
gzip compression (which should also be done on the httpd level, but we
also support anyway) and stuff like mod_pagespeed.

Reverts PR #965

Related issues as a track record proving how problematic this has been:

#2078 #1499 #2163 #2092 #2387 #2637 #2710 #2120 #2171 #2631 #2326 #2795
#2791 #2772

Additionally, the count of contributors suggesting that the only way
to fix the minifier problems is to remove it, is around the same as
the count of people suggesting the feature to be implemented in the
first place. It was experimental anyway ... the experiment failed.

ghost pushed a commit to goreilly/CodeIgniter that referenced this pull request Jan 3, 2015

Remove output minifier
This feature has proven to be problematic and it's not nearly
as flexible as a dedicated minifier library like Minify
(http://www.minifier.org/, https://github.com/matthiasmullie/minify).

The same results in terms of saving traffic can also be achievied via
gzip compression (which should also be done on the httpd level, but we
also support anyway) and stuff like mod_pagespeed.

Reverts PR #965

Related issues as a track record proving how problematic this has been:

#2078 #1499 #2163 #2092 #2387 #2637 #2710 #2120 #2171 #2631 #2326 #2795
#2791 #2772

Additionally, the count of contributors suggesting that the only way
to fix the minifier problems is to remove it, is around the same as
the count of people suggesting the feature to be implemented in the
first place. It was experimental anyway ... the experiment failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment