Metadata download, do not strip # from titles. Fixes #898310 (Special characters stripped rather than encoded when getting metadata)

This commit is contained in:
Kovid Goyal 2011-12-01 08:33:47 +05:30
parent 37b4107052
commit 61e828b2c2
2 changed files with 9 additions and 1 deletions

View File

@ -741,6 +741,14 @@ if __name__ == '__main__': # tests {{{
isbn_test, title_test, authors_test)
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
{'identifiers':{'isbn': '9780671578275'}},
[title_test('A Civil Campaign: A Comedy of Biology and Manners',

View File

@ -344,7 +344,7 @@ class Source(Plugin):
# Remove single quotes not followed by 's'
(r"'(?!s)", ''),
# Replace other special chars with a space
(r'''[:,;+!@#$%^&*(){}.`~"\s\[\]/]''', ' ')
(r'''[:,;+!@$%^&*(){}.`~"\s\[\]/]''', ' '),
]]
for pat, repl in title_patterns: