From eaf184c8335b665c5e6e37b64c21a00a0afc14c3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 23 Jan 2011 00:08:47 -0500 Subject: [PATCH] Bug - The _query command now generates JSON with the string entities properly encoded. --- src/Task.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index 5aa7e8eac..6456d80f2 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -27,14 +27,15 @@ #include #include -#include "Context.h" -#include "Nibbler.h" -#include "Date.h" -#include "Duration.h" -#include "Task.h" -#include "text.h" -#include "util.h" -#include "main.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include extern Context context; @@ -462,7 +463,7 @@ std::string Task::composeJSON () const out << "\"" << i->second.name () << "\":\"" - << i->second.value () + << JSON::encode (i->second.value ()) << "\""; ++attributes_written; @@ -487,7 +488,7 @@ std::string Task::composeJSON () const out << "{\"entry\":\"" << d.toISO () << "\",\"description\":\"" - << i->second.value () + << JSON::encode (i->second.value ()) << "\"}"; ++annotations_written;