title: Pattern web unable to locate elements by class names
body: <p>I'm trying to identify DOM elements by class name, but I'm not able to use the pattern.web as described <a href="https://www.clips.uantwerpen.be/pages/pattern-web#DOM" rel="nofollow noreferrer">in the docs</a> (I'm also running code that I've used before, so it did work at some point). </p>
  
  <pre><code>from pattern.web import DOM
  
  html = """&lt;html&gt;&lt;head&gt;&lt;title&gt;pattern.web | CLiPS&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
    &lt;div class="class1 class2 class3"&gt;
      &lt;form action="/pages/pattern-web"  accept-charset="UTF-8" method="post" id="search-block-form"&gt;
        &lt;div&gt;
          &lt;label for="edit-search-block-form-1"&gt;Search this site: &lt;/label&gt;
        &lt;/div&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/body&gt;&lt;/html&gt;"""
  
  dom = DOM(html)
  print "Search Results by Method:"
  print 'tag[attr="value"] Notation Results:'
  print dom('div[class="class1 class2 class3"]')
  print 
  print 'tag.class Notation Results:'
  print dom('div.class1')
  print
  print 'By class, no tag results:'
  print dom.by_class('class1')
  print 
  print 'Looping through all divs and printing matching results:'
  for i in dom('div'):
      if 'class' in i.attrs and i.attrs['class'] == 'class1 class2 class3':
          print i.attrs
  </code></pre>
  
  <p>Note that (<code>Element</code> and <code>DOM</code> functions are interchangeable and give the same results). The result is this:</p>
  
  <pre><code>Search Results by Method:
  tag[attr="value"] Notation Results:
  []
  
  tag.class Notation Results:
  []
  
  By class, no tag results:
  [Element(tag='div')]
  
  Looping through all divs and printing matching results:
  {u'class': u'class1 class2 class3'}
  </code></pre>
  
  <p>As you can see, looking it up using the <code>tag.class</code> notation and the <code>tag[attr="value"]</code> notation both give empty results, but <code>by_class</code> returns one result. Clearly elements with those attributes exist. How do I search for all the divs that have all 3 classes?</p>
  
  <p>In the past, I've been able to search using <code>dom('div.class1.class2.class3')</code> to identify a div with all 3 classes. Not only does this not work, it's also giving me unicode errors (it appears that the second period causes a unicode error) : <code>TypeError: descriptor 'lower' requires a 'str' object but received a 'unicode'</code></p>