Skip to content

Commit

Permalink
fix unicode issue for py2
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Alsina committed May 9, 2017
1 parent 8740351 commit 748c9d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/manual.txt
Expand Up @@ -1060,7 +1060,7 @@ chart
emoji
Insert an emoji. For example::

{{% emoji crying_face %}}
{{% raw %}}{{% emoji crying_face %}}{{% /raw %}}

This generates a ``span`` with ``emoji`` CSS class, so you can style it with a nice font if you want.

Expand Down
4 changes: 2 additions & 2 deletions nikola/plugins/shortcode/emoji/__init__.py
Expand Up @@ -38,9 +38,9 @@ def handler(self, name, filename=None, site=None, data=None, lang=None, post=Non
if not TABLE:
_populate()
try:
output = '''<span class="emoji">{}</span>'''.format(TABLE[name])
output = u'''<span class="emoji">{}</span>'''.format(TABLE[name])
except KeyError:
LOGGER.warning('Unknown emoji {}'.format(name))
output = '''<span class="emoji error">{}</span>'''.format(name)
output = u'''<span class="emoji error">{}</span>'''.format(name)

return output, []

0 comments on commit 748c9d9

Please sign in to comment.