Bug
- The _query command now generates JSON with the string entities properly encoded.
This commit is contained in:
21
src/Task.cpp
21
src/Task.cpp
@@ -27,14 +27,15 @@
|
|||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "Context.h"
|
#include <Context.h>
|
||||||
#include "Nibbler.h"
|
#include <Nibbler.h>
|
||||||
#include "Date.h"
|
#include <Date.h>
|
||||||
#include "Duration.h"
|
#include <Duration.h>
|
||||||
#include "Task.h"
|
#include <Task.h>
|
||||||
#include "text.h"
|
#include <JSON.h>
|
||||||
#include "util.h"
|
#include <text.h>
|
||||||
#include "main.h"
|
#include <util.h>
|
||||||
|
#include <main.h>
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
|
||||||
@@ -462,7 +463,7 @@ std::string Task::composeJSON () const
|
|||||||
out << "\""
|
out << "\""
|
||||||
<< i->second.name ()
|
<< i->second.name ()
|
||||||
<< "\":\""
|
<< "\":\""
|
||||||
<< i->second.value ()
|
<< JSON::encode (i->second.value ())
|
||||||
<< "\"";
|
<< "\"";
|
||||||
|
|
||||||
++attributes_written;
|
++attributes_written;
|
||||||
@@ -487,7 +488,7 @@ std::string Task::composeJSON () const
|
|||||||
out << "{\"entry\":\""
|
out << "{\"entry\":\""
|
||||||
<< d.toISO ()
|
<< d.toISO ()
|
||||||
<< "\",\"description\":\""
|
<< "\",\"description\":\""
|
||||||
<< i->second.value ()
|
<< JSON::encode (i->second.value ())
|
||||||
<< "\"}";
|
<< "\"}";
|
||||||
|
|
||||||
++annotations_written;
|
++annotations_written;
|
||||||
|
|||||||
Reference in New Issue
Block a user