'remove "" from varialble of html codeblock next js [duplicate]

i just want to remove "" so insted of <H2>When Does Thor: Love And Thunder Realase &Nbsp;In Disney Plus?&Nbsp;</H2> it will be displayed as When Does Thor: Love And Thunder Realase In Disney Plus?

i have edited my question now u understand what i am looking for

enter image description here


  {posts.map((itm, k) => {
          return (
            <>
       <div key={itm._id} className="Question-one">
                <h2> {itm.Name}</h2>
                 <div>
                  {itm.htmldata}
                  </div>
              </div>
              <div className="username">
                <span className="username2">--{itm.username}</span>
              </div>
            </>
          );
        })}
      </>


Solution 1:[1]

TLDR

For that way you can use dangerouslySetInnerHTML props in the JSX tag.

Answer

React just support innerHTML with the dangerouslySetInnerHTML. And if you just input HTML, react are going to parse it just String data type. So, you can't get what you want

<div dangerouslySetInnerHTML={{ __html: itm.htmldata }}></div>

ETC

Even you can use react-html-renderer library

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1