You'll notice a mild asymmetry in how hash was
saved vs retrieved.
The retrieval was:
JSON.parse(decodeUrlComponent(hash))
The save was:
JSON.stringify(hash)
I modified it to:
JSON.stringify(encodeUrlComponent(hash))
The reason I noticed this is in one of my apps,
I wanted to be able to copy/share a stateful filter URL.
However without the url encoding, those auto-parsers
of URLs were missing the full filter.
TESTING CONDUCTED:
1. Updated the Hash unit tests to both parse the
encoded string, as well as generate it.
2. Ran "grunt", which has built/tested/jslinted
the code.
1. Moved comment above a line to ensure that
maximum line length of 80 characters is not breached.
2. Removed a mistaken ()=> which was left behind (that would have
introduced the exact problem this change was intended to solve.)
This commit primarily fixes this issue:
https://github.com/koalyptus/TableFilter/issues/258
The fix here is to store a Sync call closed over "this" straight within
the object we're referencing. This having access to that object, we can
always retrieve the exact function reference/pointer/instance for removal
from handling events.