fix webif xml encoding, part 2

This commit is contained in:
TangoCash
2018-03-28 22:24:19 +02:00
committed by Thilo Graf
parent 1e079ae245
commit f8b623178e
3 changed files with 63 additions and 1 deletions

View File

@@ -10,6 +10,8 @@
// UTF8 convert
#include <zapit/zapit.h>
#include <system/helpers.h>
// yhttpd
#include "yhook.h"
#include "helper.h"
@@ -542,7 +544,7 @@ std::string CyhookHandler::outValue(std::string _content) {
std::string result = "";
switch (outType) {
case xml:
result = convert_UTF8_To_UTF8_XML(_content.c_str());
result = convert_UTF8_To_UTF8_XML(utf8_check_is_valid(_content) ? _content.c_str() : iso_8859_1_to_utf8(_content).c_str());
break;
case json:
result = json_convert_string(_content);