3 ms·
It says the code is safe because it uses safe React APIs, but if you look at the code it's clearly using "dangerouslySetInnerHTML". However, if the markdown is
by gcau 2y ago
It says the code is safe because it uses safe React APIs, but if you look at the code it's clearly using "dangerouslySetInnerHTML". However, if the markdown is trusted, this should be fine. I would suggest an established library to handle this for you though, unless you want to do it highly specialised and customised (which I think they're doing here).