Bug Fix: Issue 6 append and replace unexpected behavior if there's an & in task (even in quotes)

Using the cleaninput function, to escape &'s on certain actions.
Currently the actions needing escaped &'s are append, prepend and replace.
Other actions including add need unescaped &'s.
This commit is contained in:
Paul Mansfield
2009-09-05 20:36:38 +01:00
parent 5e71728cda
commit ddaf9ade22
5 changed files with 79 additions and 1 deletions

View File

@@ -72,6 +72,12 @@ TODO: 4 prioritized (A).
replaced with
4: (A) collect the bread
EOF
test_todo_session 'replace with &' << EOF
>>> todo.sh replace 3 "thrash the hay & thresh the wheat"
3: jump on hay
replaced with
3: thrash the hay & thresh the wheat
EOF
test_todo_session 'replace error' << EOF
>>> todo.sh replace 10 "hej!"