diff --git a/src/calibre/ebooks/oeb/polish/check/css.py b/src/calibre/ebooks/oeb/polish/check/css.py index 9e4087013f..9b6812e45a 100644 --- a/src/calibre/ebooks/oeb/polish/check/css.py +++ b/src/calibre/ebooks/oeb/polish/check/css.py @@ -63,7 +63,7 @@ def message_to_error(message, name, line_offset=0): ans.HELP = rule.get('desc') or '' ans.css_rule_id = rule_id if ans.HELP and 'url' in rule: - ans.HELP += ' ' + _('See {}').format(rule['url']) + ans.HELP += ' ' + _('See detailed description.').format(rule['url']) return ans @@ -237,8 +237,10 @@ def create_job(name, css, line_offset=0, is_declaration=False): def check_css(jobs): - results = pool.check_css([j.css for j in jobs]) errors = [] + if not jobs: + return errors + results = pool.check_css([j.css for j in jobs]) for job, result in zip(jobs, results): if isinstance(result, dict): for msg in result['messages']: diff --git a/src/calibre/gui2/tweak_book/check.py b/src/calibre/gui2/tweak_book/check.py index 04f4bdfc27..86dd396fc7 100644 --- a/src/calibre/gui2/tweak_book/check.py +++ b/src/calibre/gui2/tweak_book/check.py @@ -13,7 +13,7 @@ from PyQt5.Qt import ( from calibre.ebooks.oeb.polish.check.base import WARN, INFO, DEBUG, ERROR, CRITICAL from calibre.ebooks.oeb.polish.check.main import run_checks, fix_errors -from calibre.gui2 import NO_URL_FORMATTING +from calibre.gui2 import NO_URL_FORMATTING, safe_open_url from calibre.gui2.tweak_book import tprefs from calibre.gui2.tweak_book.widgets import BusyCursor from polyglot.builtins import unicode_type, range @@ -131,6 +131,8 @@ class Check(QSplitter): elif url.startswith('activate:item:'): index = int(url.rpartition(':')[-1]) self.location_activated(index) + elif url.startswith('https://'): + safe_open_url(url) def next_error(self, delta=1): row = self.items.currentRow()