mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
yhook: avoid parameters from xml closing tag
Origin commit data
------------------
Commit: acf58551a8
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-23 (Tue, 23 Aug 2016)
Origin message was:
------------------
- yhook: avoid parameters from xml closing tag
This commit is contained in:
@@ -444,10 +444,11 @@ std::string CyhookHandler::outSingle(std::string _content) {
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::string CyhookHandler::outPair(std::string _key, std::string _content, bool _next) {
|
std::string CyhookHandler::outPair(std::string _key, std::string _content, bool _next) {
|
||||||
std::string result = "";
|
std::string result = "", _key_close = "", tmp;
|
||||||
|
ySplitString(_key, " ", _key_close, tmp);
|
||||||
switch (outType) {
|
switch (outType) {
|
||||||
case xml:
|
case xml:
|
||||||
result = outIndent() + "<" + _key + ">" + _content + "</" + _key + ">";
|
result = outIndent() + "<" + _key + ">" + _content + "</" + _key_close + ">";
|
||||||
break;
|
break;
|
||||||
case json:
|
case json:
|
||||||
result = outIndent() + "\"" + _key + "\": \"" + _content + "\"";
|
result = outIndent() + "\"" + _key + "\": \"" + _content + "\"";
|
||||||
@@ -466,11 +467,12 @@ std::string CyhookHandler::outPair(std::string _key, std::string _content, bool
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::string CyhookHandler::outArray(std::string _key, std::string _content, bool _next) {
|
std::string CyhookHandler::outArray(std::string _key, std::string _content, bool _next) {
|
||||||
std::string result = "";
|
std::string result = "", _key_close = "", tmp;
|
||||||
|
ySplitString(_key, " ", _key_close, tmp);
|
||||||
switch (outType) {
|
switch (outType) {
|
||||||
case xml:
|
case xml:
|
||||||
//TODO: xml check and DESC check
|
//TODO: xml check and DESC check
|
||||||
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
|
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
|
||||||
result += "\n";
|
result += "\n";
|
||||||
break;
|
break;
|
||||||
case json:
|
case json:
|
||||||
@@ -489,11 +491,12 @@ std::string CyhookHandler::outArray(std::string _key, std::string _content, bool
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::string CyhookHandler::outArrayItem(std::string _key, std::string _content, bool _next) {
|
std::string CyhookHandler::outArrayItem(std::string _key, std::string _content, bool _next) {
|
||||||
std::string result = "";
|
std::string result = "", _key_close = "", tmp;
|
||||||
|
ySplitString(_key, " ", _key_close, tmp);
|
||||||
switch (outType) {
|
switch (outType) {
|
||||||
case xml:
|
case xml:
|
||||||
//TODO: xml check and DESC check
|
//TODO: xml check and DESC check
|
||||||
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
|
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
|
||||||
result += "\n";
|
result += "\n";
|
||||||
break;
|
break;
|
||||||
case json:
|
case json:
|
||||||
@@ -511,11 +514,12 @@ std::string CyhookHandler::outArrayItem(std::string _key, std::string _content,
|
|||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
std::string CyhookHandler::outObject(std::string _key, std::string _content, bool _next) {
|
std::string CyhookHandler::outObject(std::string _key, std::string _content, bool _next) {
|
||||||
std::string result = "";
|
std::string result = "", _key_close = "", tmp;
|
||||||
|
ySplitString(_key, " ", _key_close, tmp);
|
||||||
switch (outType) {
|
switch (outType) {
|
||||||
case xml:
|
case xml:
|
||||||
//TODO: xml check and DESC check
|
//TODO: xml check and DESC check
|
||||||
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key + ">";
|
result = outIndent() + "<" + _key + ">\n" + _content + "</" + _key_close + ">";
|
||||||
result += "\n";
|
result += "\n";
|
||||||
break;
|
break;
|
||||||
case json:
|
case json:
|
||||||
|
Reference in New Issue
Block a user