Encoding issues. fix #974
This commit is contained in:
1 parent
d9c437bd7f
commit
9f0746a668
2 files changed
+3
-4
No files matched your search
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user