How to prevent React's dangerouslySetInnerHTML from dropping the < br/ > Filter in <code>?

when using dangerouslySetInnerHTML of React, it is found that the < br/ > Filter in is dropped

.
   

Thank you

Sep.26,2021

React does not use Filter. What code did you use to beautify the library? it gave br to Filter.


https://codepen.io/anon/pen/Y.
in this example react does not have Filter br, but react recommends br instead of / n

Menu