title: How To Remove White Space in Scrapy Spider Data
body: <p>I am writing my first spider in Scrapy and attempting to follow the documentation. I have implemented ItemLoaders. The spider extracts the data, but the data contains many line returns. I have tried many ways to remove them, but nothing seems to work. The replace_escape_chars utility is supposed to work, but I can't figure out how to use it with the <code>ItemLoader</code>. Also some people use (unicode.strip), but again, I can't seem to get it to work. Some people try to use these in items.py and others in the spider. How can I clean the data of these line returns (\r\n)? My items.py file only contains the item names and field(). The spider code is below:</p>
  
  <pre><code>from scrapy.spider import BaseSpider
  from scrapy.selector import HtmlXPathSelector
  from scrapy.contrib.loader import XPathItemLoader
  from scrapy.utils.markup import replace_escape_chars
  from ccpstore.items import Greenhouse
  
  class GreenhouseSpider(BaseSpider):
      name = "greenhouse"
      allowed_domains = ["domain.com"]
      start_urls = [
          "http://www.domain.com",
      ]
  
      def parse(self, response):
          items = []
          l = XPathItemLoader(item=Greenhouse(), response=response)
          l.add_xpath('name', '//div[@class="product_name"]')
          l.add_xpath('title', '//h1')
          l.add_xpath('usage', '//li[@id="ctl18_ctl00_rptProductAttributes_ctl00_liItem"]')
          l.add_xpath('repeat', '//li[@id="ctl18_ctl00_rptProductAttributes_ctl02_liItem"]')
          l.add_xpath('direction', '//li[@id="ctl18_ctl00_rptProductAttributes_ctl03_liItem"]')
          items.append(l.load_item())
  
          return items
  </code></pre>