From 00efad21a3c9d94401795ec8c5d092494359f0fa Mon Sep 17 00:00:00 2001 From: John Schember Date: Mon, 4 Jul 2011 15:07:49 -0400 Subject: [PATCH] Store: improve price compare. --- src/calibre/gui2/store/search/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/store/search/models.py b/src/calibre/gui2/store/search/models.py index 1fb0e5327b..9028acb142 100644 --- a/src/calibre/gui2/store/search/models.py +++ b/src/calibre/gui2/store/search/models.py @@ -22,6 +22,7 @@ from calibre.utils.icu import sort_key from calibre.utils.search_query_parser import SearchQueryParser def comparable_price(text): + text = re.sub(r'[^0-9.,]', '', text) if len(text) < 3 or text[-3] not in ('.', ','): text += '00' text = re.sub(r'\D', '', text)