Skip to content
Permalink
Browse files

Making sure the resulting string type is unicode, to make Python 2 ha…

…ppy.
  • Loading branch information
felixfontein committed Dec 28, 2015
1 parent 43f9ace commit e19120a9edc6a1d4515b332be586b2fb7795ddc0
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/shortcodes.py
@@ -284,7 +284,7 @@ def apply_shortcodes(data, registry, site=None):
data_arg = []
for p in range(pos + 1, found):
data_arg.append(sc_data[p][1])
data_arg = ''.join(data_arg)
data_arg = u''.join(data_arg)
pos = found + 1
else:
# Single shortcode
@@ -299,7 +299,7 @@ def apply_shortcodes(data, registry, site=None):
LOGGER.error('Unknown shortcode {0} (started at {1})', name, _format_position(data, current[2]))
res = ''
result.append(res)
return ''.join(result)
return u''.join(result)
except ParsingError as e:
LOGGER.error("{0}".format(e))
sys.exit(1)

0 comments on commit e19120a

Please sign in to comment.
You can’t perform that action at this time.