Changes between Version 5 and Version 6 of StripWhitespaceMiddleware


Ignore:
Timestamp:
May 31, 2011, 2:31:50 PM (13 years ago)
Author:
Cal Leeming
Comment:

Patched sub() call to stop page from being filled with unnecessary \n

Legend:

Unmodified
Added
Removed
Modified
  • StripWhitespaceMiddleware

    v5 v6  
    2929    def process_response(self, request, response):
    3030        if "text" in response['Content-Type']:
    31             new_content = self.whitespace.sub('\n', response.content)
     31            new_content = self.whitespace.sub('', response.content)
    3232            response.content = new_content
    3333            return response
Back to Top