X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/blobdiff_plain/543e3e73e8c99ad643adca3522146ae36a7a24a8..af9b2459c45635addd229e3265bd0018d71fde3b:/utils.py?ds=sidebyside diff --git a/utils.py b/utils.py index 6261982..6b3b697 100755 --- a/utils.py +++ b/utils.py @@ -230,7 +230,7 @@ def getPreferredLanguages(context): security.declarePublic('getBestTranslationLanguage') def getBestTranslationLanguage(langs, context): """ returns best translation language according - availables languages (param langs) + to available languages (param langs) and user preferences (retrieves by context) """ request = getattr(context, 'REQUEST', None) @@ -261,10 +261,12 @@ def getAdapterByInterface(ob, dotted_name, default=_marker) : else : return default +security.declarePublic('encodeQuopriEmail') def encodeQuopriEmail(name, email) : qpName = encodestring(name).replace('=\n', '') return '''"=?utf-8?q?%s?=" <%s>''' % (qpName, email) +security.declarePublic('encodeMailHeader') def encodeMailHeader(content) : s = encodestring(content).replace('=\n', '') s = s.replace('_', '=5F')