From 1d59e1da8c7fc6e4cef3053ba4fbdeb9d510646c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 17 Oct 2019 15:36:51 -0400 Subject: [PATCH] Fix unicode issues in HTML api explorer --- confluent_server/confluent/messages.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index fd2151c5..00f13016 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -76,7 +76,7 @@ def _htmlify_structure(indict): if datum is None: nd.append('') else: - nd.append(datum) + nd.append(util.stringify(datum)) ret += ",".join(nd) else: for v in indict: @@ -138,6 +138,7 @@ class ConfluentMessage(object): snippet = "" for key in pairs: val = pairs[key] + key = util.stringify(key) value = self.defaultvalue if isinstance(val, dict) and 'type' in val: valtype = val['type'] @@ -338,6 +339,7 @@ class ConfluentChoiceMessage(ConfluentMessage): snippet = '' for key in pairdata: val = pairdata[key] + key = util.stringify(key) snippet += key + ':