mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
Bug 879 - Description/Annotation ending with Slash Causes Problems
- Backslashes actually. The escaping mechanism in the low-level parser was eating leading \ characters when it should not. Very hard bug to find, trivial to fix. - Added unit tests to several components while narrowing this down.
This commit is contained in:
parent
7a2bf28005
commit
ec96d929a0
10 changed files with 135 additions and 41 deletions
|
@ -25,7 +25,6 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#define L10N // Localization complete.
|
||||
|
||||
#include <text.h>
|
||||
|
@ -410,10 +409,10 @@ std::string json::encode (const std::string& input)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Pointers might speed this up.
|
||||
std::string json::decode (const std::string& input)
|
||||
{
|
||||
std::string output;
|
||||
|
||||
for (unsigned int i = 0; i < input.length (); ++i)
|
||||
{
|
||||
if (input[i] == '\\')
|
||||
|
@ -437,7 +436,7 @@ std::string json::decode (const std::string& input)
|
|||
i += 3;
|
||||
break;
|
||||
|
||||
// If it is an unrecognized seqeence, do nothing.
|
||||
// If it is an unrecognized sequence, do nothing.
|
||||
default:
|
||||
output += '\\';
|
||||
output += input[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue