'Convert source string to BeautifulSoup object. Sets it to self.soup.
If using mod_wgsi, use html5 parsing to prevent BeautifulSoup incompatibility.'

def _get_soup(self):

    try:
        from mod_wsgi import version
        self.soup = BeautifulSoup(self.source_string, 'html5lib')
    except:
        self.soup = BeautifulSoup(self.source_string)
