Fix numerous encoding issues. Fixes #1307. Fixes #1479

This commit is contained in:
Murtuza Zabuawala
2016-07-26 15:05:14 +01:00
committed by Dave Page
parent 166d42953c
commit 06e881570a
47 changed files with 463 additions and 268 deletions

View File

@@ -9,7 +9,7 @@
"""A blueprint module implementing the maintenance tool for vacuum"""
import json
import simplejson as json
from flask import url_for, Response, render_template, request, current_app
from flask_babel import gettext as _
@@ -171,9 +171,9 @@ def create_maintenance_job(sid, did):
if request.form:
# Convert ImmutableDict to dict
data = dict(request.form)
data = json.loads(data['data'][0])
data = json.loads(data['data'][0], encoding='utf-8')
else:
data = json.loads(request.data.decode())
data = json.loads(request.data, encoding='utf-8')
index_name = None