From 42a52c6e77f5cde38de6907afda0a61ba4d4d67f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 10 Apr 2016 11:46:58 +0530 Subject: [PATCH] Use a missing: URL scheme for missing resources --- src/calibre/srv/render_book.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py index 017650df8d..1a700d2b5d 100644 --- a/src/calibre/srv/render_book.py +++ b/src/calibre/srv/render_book.py @@ -11,6 +11,7 @@ from itertools import count from functools import partial from future_builtins import map from urlparse import urlparse +from urllib import quote from cssutils import replaceUrls @@ -143,7 +144,7 @@ class Container(ContainerBase): frag = urlunquote(frag) url = resource_template.format(encode_url(name, frag)) else: - url = 'link-to-missing-item-' + name + url = 'missing:' + quote(name) changed.add(base) return url