From 50ad2597c458cd036259326ca62f30f720f289f9 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 3 Jan 2011 19:07:59 +0000 Subject: [PATCH] Fix issues when search engines results contain a '|' --- src/searchengine/nova/novaprinter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/searchengine/nova/novaprinter.py b/src/searchengine/nova/novaprinter.py index 0779dc75b..848f932fa 100644 --- a/src/searchengine/nova/novaprinter.py +++ b/src/searchengine/nova/novaprinter.py @@ -1,4 +1,4 @@ -#VERSION: 1.41 +#VERSION: 1.43 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -36,9 +36,9 @@ def prettyPrinter(dictionary): dictionary[key] = unicode(dictionary[key], 'utf-8') dictionary['size'] = anySizeToBytes(dictionary['size']) if dictionary.has_key('desc_link'): - print u"%s|%s|%s|%s|%s|%s|%s"%(dictionary['link'],dictionary['name'],dictionary['size'],dictionary['seeds'],dictionary['leech'],dictionary['engine_url'],dictionary['desc_link']) + print u"%s|%s|%s|%s|%s|%s|%s"%(dictionary['link'],dictionary['name'].replace('|',' '),dictionary['size'],dictionary['seeds'],dictionary['leech'],dictionary['engine_url'],dictionary['desc_link']) else: - print u"%s|%s|%s|%s|%s|%s"%(dictionary['link'],dictionary['name'],dictionary['size'],dictionary['seeds'],dictionary['leech'],dictionary['engine_url']) + print u"%s|%s|%s|%s|%s|%s"%(dictionary['link'],dictionary['name'].replace('|',' '),dictionary['size'],dictionary['seeds'],dictionary['leech'],dictionary['engine_url']) def anySizeToBytes(size_string): """