fix webif xml encoding, part 2

Origin commit data
------------------
Branch: ni/coolstream
Commit: 6b449f5d95
Author: TangoCash <eric@loxat.de>
Date: 2018-03-28 (Wed, 28 Mar 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2018-03-28 22:24:19 +02:00
committed by vanhofen
parent 657c76eec4
commit 8b21192b11
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);