Encoding issues. fix #974

This commit is contained in:
Ruud committed 2012-12-17 20:50:58 +01:00
1 parent d9c437bd7f
commit 9f0746a668
2 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ def tryUrlencode(s):
return new[1:] return new[1:]
else: else:
for letter in toUnicode(s): for letter in ss(s):
try: try:
new += quote_plus(letter) new += quote_plus(letter)
except: except:
+2 -3
View File
@@ -1,8 +1,7 @@
from StringIO import StringIO from StringIO import StringIO
from couchpotato import addView from couchpotato import addView
from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.encoding import tryUrlencode, simplifyString, ss, \ from couchpotato.core.helpers.encoding import tryUrlencode, ss, toSafeString
toSafeString
from couchpotato.core.helpers.variable import getExt, md5 from couchpotato.core.helpers.variable import getExt, md5
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.environment import Env from couchpotato.environment import Env
@@ -222,7 +221,7 @@ class Plugin(object):
def getCache(self, cache_key, url = None, **kwargs): def getCache(self, cache_key, url = None, **kwargs):
cache_key = md5(cache_key) cache_key = md5(ss(cache_key))
cache = Env.get('cache').get(cache_key) cache = Env.get('cache').get(cache_key)
if cache: if cache:
if not Env.get('dev'): log.debug('Getting cache %s', cache_key) if not Env.get('dev'): log.debug('Getting cache %s', cache_key)