From 7e6b4fa4d07fc5f85c332dfe6a61ff266bf341d3 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 17 Oct 2019 11:25:03 -0400 Subject: [PATCH] Fix HTML view with unicode --- confluent_server/confluent/messages.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index 32eee244..fd2151c5 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -23,6 +23,7 @@ import confluent.config.configmanager as cfm import confluent.config.conf as cfgfile from copy import deepcopy from datetime import datetime +import confluent.util as util import json try: @@ -59,7 +60,9 @@ def _htmlify_structure(indict): if isinstance(indict, dict): for key in sorted(indict): ret += "
  • {0}: ".format(key) - if type(indict[key]) in (bytes, unicode, float, int): + if type(indict[key]) in (bytes, unicode): + ret += util.stringify(indict[key]) + if type(indict[key]) in (float, int): ret += str(indict[key]) elif isinstance(indict[key], datetime): ret += indict[key].strftime('%Y-%m-%dT%H:%M:%S')