Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions mincss/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,7 @@ def __found(self, bodies, selector):
return False

def _make_absolute_url(self, url, href):
parsed = urlparse.urlparse(url)
if href.startswith('//'):
return parsed.scheme + ':' + href
if href.startswith('/'):
return parsed.scheme + '://' + parsed.netloc + href
if href.count('://'):
return href
path = parsed.path
parts = path.split('/')
parts[-1] = href
path = '/'.join(parts)
return parsed.scheme + '://' + parsed.netloc + path
return urlparse.urljoin(url, href)


class _Result(object):
Expand Down