Changes between Version 5 and Version 6 of StripWhitespaceMiddleware


Ignore:
Timestamp:
05/31/11 14:31:50 (4 years ago)
Author:
foxwhisper
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