Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed tasks dont stay completed #4

Closed
lukeecart opened this issue Jul 31, 2022 · 8 comments
Closed

Completed tasks dont stay completed #4

lukeecart opened this issue Jul 31, 2022 · 8 comments
Assignees

Comments

@lukeecart
Copy link
Contributor

Since the PR was merged to save the tasks to local storage the tasks are saved but not their state(completed or not)

The local storage will need to be refreshed to store the tasks as objects.

e.g.[ {title: 'task 1', completed: true} ]

@Dharmik48
Copy link
Owner

Yeah, you can store every task as an object so the checked one stay checked even after refreshing the page.

@lukeecart
Copy link
Contributor Author

@Dharmik48 There is also a security bug to html / js injection.

Inserting <img src='abc' /> as a task displays an image... and cannot be deleted unless local storage is cleared

@Dharmik48
Copy link
Owner

I think its because we are setting the new todo with the innerHTML method so it inserts it as actual img tag

@lukeecart
Copy link
Contributor Author

lukeecart commented Aug 1, 2022

Yep, exactly. We'd need to change the logic to creating the element then setting the innerText to the input.

I've raised a separate Issue for that

@Dharmik48
Copy link
Owner

Yes, I saw your issue. Are you willing to work on that?

@lukeecart
Copy link
Contributor Author

@Dharmik48 Can we close this issue now its been closed by #8

@Dharmik48
Copy link
Owner

Yeah, I forgot to close this😅

@Dharmik48
Copy link
Owner

Closed with #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants