Skip to content

Commit

Permalink
Update title strings sanitation, do not lose quotes anymore
Browse files Browse the repository at this point in the history
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
  • Loading branch information
emericg committed Nov 12, 2011
1 parent bd68f13 commit b799adb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnome/opensubtitles-download.py
Expand Up @@ -173,8 +173,8 @@ def hashFile(path):
if subtitlesList['data']:
# Sanitize title strings to avoid parsing errors
for item in subtitlesList['data']:
item['MovieName'] = item['MovieName'].replace('"', '')
item['MovieName'] = item['MovieName'].replace("'", '')
item['MovieName'] = item['MovieName'].replace('"', '\\"')
item['MovieName'] = item['MovieName'].replace("'", "\'")

# If there is more than one subtitle, let the user decided wich one will be downloaded
if len(subtitlesList['data']) != 1:
Expand Down

0 comments on commit b799adb

Please sign in to comment.