I have a props that has a string that can contain characters like &. It also contains spaces. I want to replace all spaces with .
Is there an easy way to do this? Keep in mind that I cannot just execute this syntax:
<div dangerouslySetInnerHTML={{__html: myValue}} />
because first I need to replace any HTML objects with my markup. I do not want to do this, it seems too low.
Is there any way to do this?
html reactjs
Jack Allan Jun 26 '14 at 1:59 a.m. 2014-06-26 13:59
source share