Changes between Version 8 and Version 9 of StripWhitespaceMiddleware


Ignore:
Timestamp:
May 6, 2012, 9:40:57 AM (12 years ago)
Author:
Waldir Pimenta
Comment:

fix order

Legend:

Unmodified
Added
Removed
Modified
  • StripWhitespaceMiddleware

    v8 v9  
    3232    def process_response(self, request, response):
    3333        if "text" in response['Content-Type']:
     34            new_content = self.whitespace_lead.sub('', response.content)
     35            new_content = self.whitespace_trail.sub('\n', new_content)
    3436            # Uncomment the next line to remove empty lines
    3537            # new_content = self.whitespace.sub('', new_content)
    36             new_content = self.whitespace_lead.sub('', response.content)
    37             new_content = self.whitespace_trail.sub('\n', new_content)
    3838            response.content = new_content
    3939            return response
Back to Top