cobrateam / django-htmlmin

HTML minifier for Python frameworks (not only Django, despite the name).
http://pypi.python.org/pypi/django-htmlmin
BSD 2-Clause "Simplified" License
542 stars 73 forks source link

Unexpected html #139

Open schostac opened 4 years ago

schostac commented 4 years ago

When using htmlmin.middleware.MarkRequestMiddleware for Django, in some view, for example, return HttpResponse("1") will result in <html><head></head><body>1</body></html>, but without htmlmin.middleware.MarkRequestMiddleware it will be just 1.

Why is html added when I do not want it?

KeithPYC commented 4 years ago

I am also experiencing this whenever i use custom template tags or filters before the opening -body- tag .