Open uadnan opened 9 years ago
I encountered this bug as well. It's really a bummer. It strips away the doctype leaving just html
.
Oh, the solution was trivial. In the middleware, replace response.content = html_minify(...)
with response.content = str(html_minify(...))
. I'm using Python 3 though, so str()
is unicode.
Can confirm, it removes the <!DOCTYPE html>
. Unfortunately, adding str()
on the middleware isn't working for me.
After minifying it always removes <!DOCTYPE html> from top of html content that cause the Google Chrome to load all content as body.
Loading all content in Body leads to many errors by Angular JS Lazy Loader. Fix it