summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0940c83)
Fixed issue where the it would return 500 when certain unicode
characters were used.
__author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
__author__ = 'seanh <snhmnd@gmail.com>'
__author__ = 'Benjamin Mako Hill <mako@atdot.cc>'
__author__ = 'seanh <snhmnd@gmail.com>'
-FILENAME_EXTENSIONS = ('.txt','.text','.mkdn','.markdown','.md','.mdown','.markdn','.mkd')
+FILENAME_EXTENSIONS = ('.mdwn', '.txt','.text','.mkdn','.markdown','.md','.mdown','.markdn','.mkd')
import markdown
import os
import markdown
import os
def cb_story(args):
entry = args['entry']
if os.path.splitext(entry['filename'])[1] in FILENAME_EXTENSIONS:
def cb_story(args):
entry = args['entry']
if os.path.splitext(entry['filename'])[1] in FILENAME_EXTENSIONS:
- entry['body'] = md.convert(''.join(entry['body']))
+ entry['body'] = md.convert(u''.join(entry['body'].decode("utf-8")))
- return args
\ No newline at end of file