Slight changes to encoding and remove of extra decoding

This commit is contained in:
smtddr
2014-12-31 03:44:53 +00:00
parent 2de0f70850
commit 8f4b315321

View File

@@ -99,7 +99,6 @@ class AdminPage(resource.Resource):
ingamesn = codecs.utf_16_be_decode(ingamesn)[0]
else:
ingamesn = codecs.utf_16_le_decode(ingamesn)[0]
ingamesn = codecs.utf_8_encode(ingamesn)[0].strip()
else:
ingamesn = '[NOT AVAILABLE]'
responsedata += "<tr>"
@@ -123,7 +122,8 @@ class AdminPage(resource.Resource):
"<input type='submit' value='----- unban -----'></form></td>")
responsedata += "</tr></table></html>"
dbconn.close()
return responsedata
request.setHeader("Content-Type", "text/html; charset=utf-8")
return responsedata.encode('utf-8')
def render_POST(self, request):
if not self.is_authorized(request):