5e0c6589d134

Ignore url replace in inner links starts with hash
[view raw] [browse files]
author theaspect@gmail.com
date Sat, 01 Jun 2013 16:33:11 +0700
parents 6df57370d35c
children 8f15f4ad34ed
branches/tags (none)
files __init__.py

Changes

--- a/__init__.py	Sat Jun 01 16:28:38 2013 +0700
+++ b/__init__.py	Sat Jun 01 16:33:11 2013 +0700
@@ -90,7 +90,7 @@
 
 	def rebase(proc, e, attr):
 		uri = e.get(attr, '')
-		if '://' in uri or uri.startswith('/'):
+		if '://' in uri or uri.startswith('/') or uri.startswith('#'):
 			return
 		base = base_url
 		if attr == 'src':
@@ -146,7 +146,7 @@
 
 		def rebase(proc, e, attr):
 			uri = e.get(attr, '')
-			if '://' in uri or uri.startswith('/'):
+			if '://' in uri or uri.startswith('/') or uri.startswith('#'):
 				return
 			base = base_url
 			if attr == 'src':