mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Metadata download, do not strip # from titles. Fixes #898310 (Special characters stripped rather than encoded when getting metadata)
This commit is contained in:
parent
37b4107052
commit
61e828b2c2
@ -741,6 +741,14 @@ if __name__ == '__main__': # tests {{{
|
|||||||
isbn_test, title_test, authors_test)
|
isbn_test, title_test, authors_test)
|
||||||
com_tests = [ # {{{
|
com_tests = [ # {{{
|
||||||
|
|
||||||
|
( # # in title
|
||||||
|
{'title':'Expert C# 2008 Business Objects',
|
||||||
|
'authors':['Lhotka']},
|
||||||
|
[title_test('Expert C# 2008 Business Objects', exact=True),
|
||||||
|
authors_test(['Rockford Lhotka'])
|
||||||
|
]
|
||||||
|
),
|
||||||
|
|
||||||
( # Description has links
|
( # Description has links
|
||||||
{'identifiers':{'isbn': '9780671578275'}},
|
{'identifiers':{'isbn': '9780671578275'}},
|
||||||
[title_test('A Civil Campaign: A Comedy of Biology and Manners',
|
[title_test('A Civil Campaign: A Comedy of Biology and Manners',
|
||||||
|
@ -344,7 +344,7 @@ class Source(Plugin):
|
|||||||
# Remove single quotes not followed by 's'
|
# Remove single quotes not followed by 's'
|
||||||
(r"'(?!s)", ''),
|
(r"'(?!s)", ''),
|
||||||
# Replace other special chars with a space
|
# Replace other special chars with a space
|
||||||
(r'''[:,;+!@#$%^&*(){}.`~"\s\[\]/]''', ' ')
|
(r'''[:,;+!@$%^&*(){}.`~"\s\[\]/]''', ' '),
|
||||||
]]
|
]]
|
||||||
|
|
||||||
for pat, repl in title_patterns:
|
for pat, repl in title_patterns:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user