codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
28 stars 25 forks source link

Issue 365/update-sendMessageTTL #366

Closed leekahung closed 1 year ago

leekahung commented 1 year ago

This PR fixes an existing bug related to the saved message file. Since it utilizes the title as part of the message name to generate a unique URL for the message ttl file, it's prone to errors from special characters. In the worst case scenario, the message Inbox/Outbox would break if a message URL becomes inaccessible.

To fix this, the name for the title and the slug itself will both be processed with encodeURIComponent so that it'll always return a usable string for URLs.

Clip of fix:

https://github.com/codeforpdx/PASS/assets/14917816/39934406-c269-4148-b77e-c6d9845c17b5

Screenshot of saved file:

saved_file