firebase/firebaseui-web-react

displayName is HTML entity encoded when stored

robations opened this issue · 1 comments

I'm fairly new to Firebase so maybe I misconfigured something.

I am testing with EmailAuthProvider and I enter a display name for a new user with an apostrophe (say) Flann O'Doherty, and in the returned user object I get Flann O'Doherty back, and need to convert this to unicode everywhere it's displayed.

I'm not sure at what point this is getting encoded so not sure if this is just how Firebase Auth works, or if Firebase UI is doing something to the displayName.

I'm using React, so there is no need to have entities in the output for security reasons unless dangerously injecting HTML.

On reflection, I'm guessing this is by design and not related to this project. But annoying. I worked around the issue using the he library to decode displayName within the data layer of my app.