[Answered ]-How to escape HTML tags in NextJS

1👍

To escape html tags in next js and safely render HTML from API with styles in page. So you have to do that add the following code:

<div dangerouslySetInnerHTML={{ __html: data.content }}></div>

Leave a comment