Open Zebradil opened 6 years ago
It's not strange, it's an expected behaviour. From Taskwarrior docs:
A tag may be any single word that does not start with a digit, punctuation, or mathematical operator.
I'll investigate about crash caused by \
symbol.
So, the problem with Taskwarrior itself. It handles escaped special characters incorrectly.
Just an example, what's going on:
/opt/app # task add test +one\\two
Created task 1.
/opt/app # task
[task next]
ID Age Tag Description Urg
1 5s one wo test 0.8
1 task
/opt/app # task 1 mod +one\\three
Modifying task 1 'test'.
Modified 1 task.
/opt/app # task
[task next]
ID Age Tag Description Urg
1 30s one hree one wo test 0.9
1 task
/opt/app # cat /root/.task/backlog.data
{"description":"test","entry":"20180528T012236Z","modified":"20180528T012236Z","status":"pending","tags":["one wo"],"uuid":"df115a4c-164e-4a34-99c8-6850d2414fd5"}
{"description":"test","entry":"20180528T012236Z","modified":"20180528T012302Z","status":"pending","tags":["one wo","one hree"],"uuid":"df115a4c-164e-4a34-99c8-6850d2414fd5"}
Notice, that there are two tasks with the same uuid
in the backlog file.
I'll create an issue in TW repo. But for now we could prevent app from crashing by filtering out such symbols, or forbid to save such data.
If I try to add a tag with dash (
-
) inside it, the tag will be placed as continuation of task title instead of placing in tags list. The same thing happens for/
. For\
app is crashed completely.