Remove strip spaces middleware and use spaceless template tag instead. Closes GitLab issue #255.

This commit is contained in:
Roberto Rosario
2016-03-07 20:02:26 -04:00
parent ce6a1f4020
commit 014ba4f4fe
3 changed files with 2 additions and 15 deletions
@@ -1,14 +0,0 @@
from __future__ import unicode_literals
from django.utils.html import strip_spaces_between_tags
class SpacelessMiddleware(object):
"""
Remove spaces between tags in HTML responses to save on bandwidth
"""
def process_response(self, request, response):
if 'text/html' in response.get('Content-Type', ''):
response.content = strip_spaces_between_tags(response.content)
return response