summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authordeva <deva>2008-09-08 14:11:49 +0000
committerdeva <deva>2008-09-08 14:11:49 +0000
commitdbbadfd389d2c9c7bb40e4edb9b85497da9435d4 (patch)
tree8b9c387d9457bb720b18abd65fdccf4471b9222d /server/src
parent9ed90a1ee0f9605d197f95f9234b40ad6a9b9084 (diff)
Added xml encoding to the value fields.
Diffstat (limited to 'server/src')
-rw-r--r--server/src/widgetgenerator.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/widgetgenerator.cc b/server/src/widgetgenerator.cc
index 334d4a8..a007002 100644
--- a/server/src/widgetgenerator.cc
+++ b/server/src/widgetgenerator.cc
@@ -27,6 +27,7 @@
#include "widgetgenerator.h"
#include "configuration.h"
+#include "xml_encode_decode.h"
static std::string automap(std::string name)
{
@@ -95,7 +96,7 @@ static std::string send_macro_widget(Macro &macro,
if(luamap != "") {
Value value = mapper.map(luamap);
if(value.timestamp > time(NULL) - Conf::pentominos_max_ttl) {
- widget.attributes["value"] = value.value;
+ widget.attributes["value"] = xml_encode(value.value);
timestamp = value.timestamp;
prefilled = "pentominos";
}
@@ -107,7 +108,7 @@ static std::string send_macro_widget(Macro &macro,
if(values.find(widget.attributes["name"]) != values.end() &&
(prefilled == "" || values[widget.attributes["name"]].timestamp > timestamp)) {
if(values[widget.attributes["name"]].timestamp > time(NULL) - Conf::db_max_ttl) {
- widget.attributes["value"] = values[widget.attributes["name"]].value;
+ widget.attributes["value"] = xml_encode(values[widget.attributes["name"]].value);
prefilled = "pracro";
}
}