def inline_assets(self, base_path, content):
        for type in self.asset_types:
            for statement, path in self.get_matches(type['pattern'], base_path, content):
                asset_content = self.get_binary_file_contents(path)
                encoded_content = urllib.quote(base64.encodestring(asset_content))
                new_statement = u'url(data:%s;base64,%s)' % (type['mime'], encoded_content)
                content = content.replace(statement, new_statement)
        return content
dataset/ETHPy150Open cooper-software/siteglass/siteglass/css.py/CSSBuilder.inline_assets/original