ebeeson/firebase-utils

Firebase Codec encode issue

Opened this issue · 0 comments

No idea if you even still use this repo but I noticed an issue in firebase-utils/firebase-codec/firebase-codec.js > encode() and thought I would let you know.

If your string has multiple periods in it, your encode function will only replace the first one. In order to replace all, I used a regular expression with the global flag like this:

return encodeURIComponent(key).replace(/\./g, '%2E')

If you're curious, I found your link to this repo here: https://groups.google.com/d/msg/firebase-talk/vtX8lfxxShk/H_C1DKn5Y-AJ