From dbbadfd389d2c9c7bb40e4edb9b85497da9435d4 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 8 Sep 2008 14:11:49 +0000 Subject: Added xml encoding to the value fields. --- server/src/widgetgenerator.cc | 5 +++-- 1 file 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 ¯o, 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 ¯o, 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"; } } -- cgit v1.2.3