Encode environments args in html

This commit is contained in:
Ruud
2014-06-16 22:39:02 +02:00
parent 76126271fc
commit f65ddbbb9e
2 changed files with 9 additions and 5 deletions
+6 -2
View File
@@ -2,6 +2,7 @@ import os
from couchpotato.core.database import Database
from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.loader import Loader
from couchpotato.core.settings import Settings
@@ -38,8 +39,11 @@ class Env(object):
return Env._debug
@staticmethod
def get(attr):
return getattr(Env, '_' + attr)
def get(attr, unicode = False):
if unicode:
return toUnicode(getattr(Env, '_' + attr))
else:
return getattr(Env, '_' + attr)
@staticmethod
def all():