How to convert font awesome unicode to icon

I am trying show icons in my input placeholder. In rails i was using that code

“& #xf1e3;”.html_safe

How can i handle that in phoenix ?

I solved with raw() function. My second question is Can that way cause a security issue ? It is just for show icon in placeholder

I would advise against passing variables into that function, but you should be fine if you are only using it for icons.

1 Like

This can only be a security issue if You expose raw() to user’s input, not if You set yourself the string.