Refactor function "updateTodoMsg".
Add escaping of single quotes.