middleman/middleman-minify-html — pull request #15 by michaelbaudino (2013-07-07 01:12:26+00:00)
Title: Fix htmlcompressor Content-Length computation

This PR fixes how htmlcompressor computes Content-Length.
It should be based on the number of bytes, rather than on the number of characters (which differs, e.g. with accented characters).

It should fix this issue : http://forum.middlemanapp.com/t/middleman-minify-html-content-length-header-error/697

Check out this IRB session:

2.0.0-p247 :001 > 'é'.length
=> 1
2.0.0-p247 :002 > 'é'.bytesize
=> 2