From f04ea0f22ee7b323468fe8b6f0c061c6c9f676a2 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 1 Sep 2019 14:44:00 -0400 Subject: [PATCH] use raw strings where possible to avoid escaping --- src/calibre/gui2/library/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 95240d4d11..333c8f5986 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -1153,7 +1153,7 @@ class BooksModel(QAbstractTableModel): # {{{ return False val = (int(value) if column == 'rating' else value if column in ('timestamp', 'pubdate') - else re.sub('\\s', ' ', unicode_type(value or '').strip())) + else re.sub(r'\s', ' ', unicode_type(value or '').strip())) id = self.db.id(row) books_to_refresh = {id} if column == 'rating':