Edit metadata dialog: Fix pasting ISBN from clipboard not stripping garbage characters after a valid ISBN. Fixes #1604956 [paste ISBN button regular expression](https://bugs.launchpad.net/calibre/+bug/1604956)

This commit is contained in:
Kovid Goyal 2016-07-21 08:44:39 +05:30
parent 377d75a5f4
commit a99da9be69

View File

@ -1523,9 +1523,11 @@ class IdentifiersEdit(QLineEdit, ToMetadataMixin):
text = d.text() text = d.text()
if not text: if not text:
return return
vals = self.current_val text = check_isbn(text)
vals['isbn'] = text if text:
self.current_val = vals vals = self.current_val
vals['isbn'] = text
self.current_val = vals
# }}} # }}}