diff --git a/rhodecode/lib/__init__.py b/rhodecode/lib/__init__.py --- a/rhodecode/lib/__init__.py +++ b/rhodecode/lib/__init__.py @@ -231,6 +231,10 @@ def safe_str(unicode_, to_encoding=None) :rtype: str :returns: str object """ + + # if it's not basestr cast to str + if not isinstance(unicode_, basestring): + return str(unicode_) if isinstance(unicode_, str): return unicode_