summaryrefslogtreecommitdiff
path: root/server/src/widgetgenerator.cc
diff options
context:
space:
mode:
authordeva <deva>2010-05-07 12:36:13 +0000
committerdeva <deva>2010-05-07 12:36:13 +0000
commit016e4ba553044edee32c2a20ee34463ad82106e8 (patch)
tree8fdde7232ee847ba39eb94449b18fd3de7bb4fb8 /server/src/widgetgenerator.cc
parent965e43178736e6635cf27410e6d73f4ec0fdced2 (diff)
Use connection object instead of struct and make xml parsing on-the-fly instead of collecting all data first.
Diffstat (limited to 'server/src/widgetgenerator.cc')
-rw-r--r--server/src/widgetgenerator.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/widgetgenerator.cc b/server/src/widgetgenerator.cc
index 1e60479..425c71e 100644
--- a/server/src/widgetgenerator.cc
+++ b/server/src/widgetgenerator.cc
@@ -109,9 +109,9 @@ static std::string send_macro_widget(Macro &macro,
if(luamap != "") {
Value value = mapper.map(luamap);
if(value.timestamp > now - Conf::pentominos_max_ttl) {
- widget.attributes["value"] = xml_encode(value.value);
+ widget.attributes["value"] = value.value;
timestamp = value.timestamp;
- prefilled = xml_encode(value.source);
+ prefilled = value.source;
}
PRACRO_DEBUG(prefill, "map: (%s, %d)\n",
@@ -137,7 +137,7 @@ static std::string send_macro_widget(Macro &macro,
if(values[widget.attributes["name"]].timestamp > timestamp) {
if(values[widget.attributes["name"]].timestamp > now - Conf::db_max_ttl) {
- widget.attributes["value"] = xml_encode(values[widget.attributes["name"]].value);
+ widget.attributes["value"] = values[widget.attributes["name"]].value;
timestamp = values[widget.attributes["name"]].timestamp;
prefilled = "pracro";
}
@@ -152,7 +152,7 @@ static std::string send_macro_widget(Macro &macro,
while(p != widget.attributes.end()) {
if(p->first != "tagname" && p->first != "map") {
if( ! (p->first == "name" && p->second == "") )
- result += " " + p->first + "=\"" + p->second + "\"";
+ result += " " + p->first + "=\"" + xml_encode(p->second) + "\"";
}
p++;
}