Ticket #766: AddComment-utf8.patch
| File AddComment-utf8.patch, 1.1 kB (added by tonin, 2 years ago) |
|---|
-
AddComment.py
old new 16 16 raise TracError('\'AddComment\' macro cannot be included twice') 17 17 hdf['addcommentmacro'] = True 18 18 19 authname = hdf.getValue("trac.authname", "anonymous") 19 authname = hdf.getValue("trac.authname", "anonymous").decode('utf-8') 20 20 db = env.get_db_cnx() 21 21 perm = trac.perm.PermissionCache(env, authname) 22 22 pagename = hdf.getValue("wiki.page_name", "WikiStart") … … 35 35 36 36 disabled = '' 37 37 38 comment = Markup(hdf.getValue("args.addcomment", "") ).unescape()38 comment = Markup(hdf.getValue("args.addcomment", "").decode('utf-8')).unescape() 39 39 preview = hdf.getValue("args.previewaddcomment", "") 40 40 cancel = hdf.getValue("args.canceladdcomment", "") 41 41 submit = hdf.getValue("args.submitaddcomment", "") 42 42 if not cancel: 43 authname = hdf.getValue("args.authoraddcomment", authname) 43 authname = hdf.getValue("args.authoraddcomment", authname).decode('utf-8') 44 44 45 45 # Ensure [[AddComment]] is not present in comment, so that infinite 46 46 # recursion does not occur.
