summaryrefslogtreecommitdiff
path: root/server/src/widgetgenerator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/widgetgenerator.cc')
-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";
}
}