mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 14:23:06 +02:00
Fix #7995 (fonta replacement through extra css stopped working)
This commit is contained in:
parent
4a41f77eb3
commit
6abc12cf18
1 changed files with 5 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
|||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import posixpath
|
||||
from urlparse import urldefrag
|
||||
from urlparse import urldefrag, urlparse
|
||||
|
||||
from lxml import etree
|
||||
import cssutils
|
||||
|
|
@ -67,6 +67,10 @@ def fix_toc_entry(self, toc):
|
|||
|
||||
def url_replacer(self, orig_url):
|
||||
url = urlnormalize(orig_url)
|
||||
parts = urlparse(url)
|
||||
if parts.scheme:
|
||||
# Only rewrite local URLs
|
||||
return orig_url
|
||||
path, frag = urldefrag(url)
|
||||
if self.renamed_items_map:
|
||||
orig_item = self.renamed_items_map.get(self.current_item.href, self.current_item)
|
||||
|
|
|
|||
Loading…
Reference in a new issue