X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/bab36e3cf0951beb3e50b40c85c1f44fd0c2a0bc..6c9978c5bf8b1ef20871557c22b8b02df647d700:/contact/utils.py diff --git a/contact/utils.py b/contact/utils.py index ce37833..bba8c34 100644 --- a/contact/utils.py +++ b/contact/utils.py @@ -1,8 +1,12 @@ +# -*- coding: utf-8 -*- + + def csv_escape(string): return '"' + string.replace('\r\n', ' ').replace('\n', ' ').replace('"', '\"') + '"' + def csv_prepare(obj): to_escape = obj if not isinstance(obj, unicode): to_escape = str(to_escape) - return csv_escape(to_escape) \ No newline at end of file + return csv_escape(to_escape)